Clock phase ranging methods and systems

ABSTRACT

A system and method for estimating the range between two devices performs two or more ranging estimates with subsequent estimates performed using a clock that is offset in phase with respect to a prior estimate. The subsequent estimate allows estimate uncertainties due to a finite clock resolution to be reduced and can yield a range estimate with a higher degree of confidence. In one embodiment, these additional ranging estimates are performed at n/N (for n=1, . . . N−1, with N&gt;1 and a positive integer) clock-period offset introduced in the device. The clock-period offset can be implemented using a number of approaches, and the effect of clock drift in the devices due to relative clock-frequency offset can also be determined. To eliminate the bias due to clock-frequency offset, a system and method to estimate the clock-frequency offset is also presented.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority as a division of U.S. patentapplication Ser. No. 11/364,522, filed on Feb. 27, 2006, the entirecontents of which are incorporated by reference.

FIELD OF THE INVENTION

The present invention relates generally to communication channels, andmore particularly to a system and method for performing rangecalculations among two or more electronic devices.

BACKGROUND OF THE INVENTION

With the many continued advancements in communications technology, moreand more devices are being introduced in both the consumer andcommercial sectors with advanced communications capabilities.Additionally, advances in processing power and low-power consumptiontechnologies, as well as advances in data coding techniques have led tothe proliferation of wired and wireless communications capabilities on amore widespread basis.

For example, wired and wireless communication networks are nowcommonplace in many home and office environments. Such networks allowvarious heretofore independent devices to share data and otherinformation to enhance productivity or simply to improve theirconvenience to the user. One such communication network that is gainingwidespread popularity is an exemplary implementation of a wirelessnetwork such as that specified by the WiMedia-MBOA (Multiband OFDMAlliance). Other exemplary networks include the Bluetooth®communications network and various IEEE standards-based networks such as802.11 and 802.16 communications networks.

Computing the distance of a target wireless device from a referencewireless device is called ranging. Ranging can be performed by measuringthe received signal strength (RSS) or the time of arrival(time-of-arrival) of the signal propagated between the target andreference node. The ranging accuracy using the received signal strengthdepends on the accurate modeling of path-loss and the propagationchannel environment. On the other hand, the ranging accuracy usingtime-of-arrival typically depends on the estimation accuracy of time ofarrival, because electromagnetic waves propagate at approximately thespeed of light and thus a small error (in the nanosecond scale) in timetranslates to larger error in distance. The estimation accuracy of timeof arrival depends on the available signal bandwidth, and the accuracyand resolution of the sampling clock frequency. Therefore, ultrawideband (UWB) technology that occupies greater than 500 MHz bandwidthis suitable for ranging and provides centimeter-level accuracy. Theproposed effort for IEEE 802.15.3a and WiMedia standardizes UWBtechnology to provide high-rate (>53.3 MB/s) wireless connectivity inwireless personal network (WPAN) and WiMedia has proposed two-wayranging (TWR) as an additional feature for UWB systems. Also, thespecifications of IEEE 802.15.4a for low-rate (<250 KB/s) WPAN makesranging mandatory.

Ranging using multiple reference devices can enable positioning.Computing the 2D/3D position of a target wireless device relative to acoordinate system commonly known to a set of reference devices is calledpositioning. One common positioning system is the Global PositioningSystem, or GPS. Geodesic positioning obtained by a GPS receiver requiressynchronous signal from at least four satellites. Although, the coverageof GPS positioning is broad, it requires line-of-sight connectivity fromthe satellites that may not exist in certain geographic locations.Indoor coverage may suffer as well, such as in office building, shoppingmall, warehouse, auditorium, indoor stadium, parking structure.Furthermore, GPS receivers are costly and provide only meter-levelaccuracy.

Another ranging technique is the local positioning systems (LPS). Localpositioning systems can provide indoor positioning using an ad-hocwireless sensor network. To provide different emerging applications oflocation awareness, the location of such sensors has to be accurate andautomatically configurable. A host of applications can be envisionedusing the LPS. For example: (i) LPS for public safety—placing alocalizer along a trail to mark the route, locating fire fighters in aburning building, locating children lost in the mall or park, etc.; (ii)LPS for smart home applications—automatic door opening when the residentis in the vicinity, activating certain appliances or devices dependingon resident location, timing adjustment of light, temperature and soundlevel per individual profile, finding personal item such as pets, keys,purse, luggage; (iii) LPS in inventory control—localizers for real-timeinventory, differentiating the contents of one container from theothers; locating a book in the library, a document file in a law office;(iv) LPS for health care—hospital staff, patients and assets tracking,simplified record keeping and workflow, raising an alert if a staffmember had not check a particular patient, visitor tracking forsecurity, automatic pop-up of patient records on a tablet PC for adoctor's visit; and (iv) LPS for intelligent vehicle highwaysystem—placing localizers along the side of a road to use as guideposts, placing localizers in vehicles to provide local intelligence forsafety and providing centimeter level accuracy as opposed to meter levelaccuracy using GPS. Thus, ubiquitous use of position awareness implieslocal positioning systems which are expected to be low-cost, low-power,small-size and have scaleable accuracy.

Two-way ranging between a pair of devices has been used in variousapplications, including wireless networks. In general, ranging accuracyof the time-of-flight-based method depends on the signal bandwidth usedin the transactions. However, assuming an operating bandwidth of thereceiver to be higher than the signal bandwidth, the rate of thesampling clock affects the timing accuracy of ranging transactions—thehigher the rate of the sampling clock, the higher the ranging accuracy.This is due to the fact that sampling with a higher clock frequencyresults in a more accurate timing resolution. However, due to thedifficulty of accurately synchronizing all devices in certainapplications, two-way ranging accuracies can be somewhat diminished. Forexample, if the respective clocks of the devices participating in themeasurement have relative offset between them, a certain amount of errorwill be introduced in the measurement.

One way to improve the accuracy is to increase the frequency of theclock. At higher frequencies, the clock periods are shorter and thus themaximum offset is smaller. The higher clock frequency also makes timeresolutions finer, reducing uncertainties related to time quantizationnoise. For example, using 528 MHz sampling clock rate gives the finiteranging resolution of 56.8 cm. Typically, the overall offset isstatistically smaller as well. However, it is not always possible,practical or desirable to increase the rate of the sampling clock.Higher clock frequency requires higher complexity and higher powerconsumption in the device.

BRIEF SUMMARY OF THE INVENTION

The present invention is directed toward a system and method fordetermining or estimating the distance between two devices based on theelapsed time required for a signal to travel between those devices. Moreparticularly, in one embodiment, the present invention provides ameasurement or other estimate of distance between two wireless devicesbased on the time of flight of a signal from one device to the next. Thetime of flight can be measured on a round trip basis, and divided inhalf to determine the one-way time of flight. In one embodiment,subsequent measurements are made to enhance the accuracy of theestimate. The subsequent measurements can be made with a phase offsetintroduced in a sampling clock so as to better account for uncertaintiesin the measurement process due to clock granularity.

In one embodiment the invention provides a system and method ofdetermining a distance between first and second wireless communicationdevices, by conducting a first estimate of a time of flight of a signalbetween the first and second wireless communication devices, conductingat least one subsequent estimate of a time of flight of a signal betweenthe first and second wireless communication devices, wherein thesubsequent estimates are performed with a clock phase in the firstdevice that is offset relative to a prior estimate, and computing arefined estimate of the time of flight of a signal between the first andsecond wireless communication devices as a function of thetime-of-flight estimates. In one embodiment, the refined estimate can becomputed by determining the difference between the first time-of-flightestimate and a second time-of-flight estimate and computing a refinedestimate of the time of flight of the signal based on the differencebetween the first and second time-of-flight measurements.

In accordance with one embodiment of the invention, the refined estimatecan be computed by determining a difference between a subsequenttime-of-flight estimate and a prior time-of-flight estimate, determininga mean value of the uncertainty due to finite clock resolution intime-of-flight estimates, and adjusting the first time of flightestimate by an amount of clock cycles, wherein the amount of clockcycles is determined based on the differences between subsequent andprior time-of-flight estimates. The difference between time-of-flightestimates determined for each subsequent estimate can be determined as adifference between that subsequent estimate and the first estimate.

In one embodiment computing the refined estimate can be accomplished bydetermining the difference between the first time-of-flight estimate anda second time-of-flight estimate in cycles, as ({circumflex over(t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f₀; where {circumflex over(t)}_(OF) is the first time-of-flight measurement, ({circumflex over(t)}_(OF))_(1/2) is the second time-of-flight measurement and f₀ is theclock frequency; and computing a refined estimate of the time of flightof the signal based on the difference between the first and secondtime-of-flight measurements as

$\begin{matrix}{{{if}\mspace{14mu} D_{1/2}} = {{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}} = {\left. 1\Rightarrow{\overset{\Cup}{t}}_{OF} \right. = {{\hat{t}}_{OF} - \frac{3}{4}}}}} \\{{{if}\mspace{14mu} D_{1/2}} = {{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}} = {\left. 0\Rightarrow{\overset{\Cup}{t}}_{OF} \right. = {{\hat{t}}_{OF} - \frac{1}{2}}}}} \\{{{if}\mspace{14mu} D_{1/2}} = {{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}} = {\left. {- 1}\Rightarrow{\overset{\Cup}{t}}_{OF} \right. = {{\hat{t}}_{OF} - \frac{1}{4}}}}}\end{matrix}.$

In another embodiment computing the refined estimate can be accomplishedby determining the difference between the first time-of-flight estimateand a second time-of-flight estimate in cycles, as ({circumflex over(t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f₀; where {circumflex over(t)}_(OF) is the first time-of-flight measurement ({circumflex over(t)}_(OF))_(1/2) is the second time-of-flight measurement and f₀ is theclock frequency; and computing a refined estimate of the time of flightof the signal based on the difference between the first and secondtime-of-flight measurements as

if D _(1/2)=2({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f ₀=1

{hacek over (t)}_(OF) ·f ₀ ={circumflex over (t)} _(OF) ·f ₀ +c ₁

if D _(1/2)=2({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f ₀=0

{hacek over (t)}_(OF) ·f ₀ ={circumflex over (t)} _(OF) ·f ₀ +c ₂

if D _(1/2)=2({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f ₀=−1

{hacek over (t)}_(OF) ·f ₀ ={circumflex over (t)} _(OF) ·f ₀ +c ₃

where c₁, c₂ and c₃ are constants.

In accordance with one embodiment of the invention, computing therefined estimate can be accomplished by determining the differencebetween the time-of-flight estimates in cycles, where {circumflex over(t)}_(OF) is the first time-of-flight measurement, f₀ is the clockfrequency, and D_(n/N), n=0,1, . . . , N−1 is the difference between thezero-th (n=0) estimate with no additional offset and an n-th estimatewith n/N offset; and computing a refined estimate of the time of flightof the signal based on the difference, wherein the refined estimate isdetermined as

${\left( {\overset{\Cup}{t}}_{OF} \right)_{N} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - {\left( {{\frac{1}{2N}\left( {\sum\limits_{n = 0}^{N - 1}D_{n/N}} \right)} + \frac{1}{2}} \right).}}$

In another embodiment, the refined estimate is determined as

${{\left( {\overset{\Cup}{t}}_{OF} \right)_{N} \cdot f_{0}} = {\beta \cdot \left\lbrack {{{\hat{t}}_{OF} \cdot f_{0}} - {\alpha \cdot \left( {{\frac{1}{2N}\left( {\sum\limits_{n = 0}^{N - 1}D_{n/N}} \right)} + \frac{1}{2}} \right)} + c} \right\rbrack}},$

where α, β and c are constants.

Further features and advantages of the present invention, as well as thestructure and operation of various embodiments of the present invention,are described in detail below with reference to the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention, in accordance with one or more variousembodiments, is described in detail with reference to the followingfigures. The drawings are provided for purposes of illustration only andmerely depict typical or example embodiments of the invention. Thesedrawings are provided to facilitate the reader's understanding of theinvention and shall not be considered limiting of the breadth, scope, orapplicability of the invention. It should be noted that for clarity andease of illustration these drawings are not necessarily made to scale.

FIG. 1 is a block diagram illustrating one possible configuration of awireless network that can serve as an example environment in which thepresent invention can be implemented.

FIG. 2 is a diagram illustrating an example of time-of-flightmeasurement using two-way packet transmission in accordance with oneembodiment of the invention.

FIG. 3 is a diagram illustrating an example timeline for two-way rangingin accordance with one embodiment of the invention.

FIG. 4 is a flow diagram illustrating a process for two-way ranging inaccordance with one embodiment of the invention.

FIG. 5 is a flow diagram illustrating a process for improving accuracywith subsequent measurements in accordance with another embodiment ofthe invention.

FIG. 6 is a diagram illustrating an example of inaccuracies, δ₁ and δ₂,due to finite clock resolution.

FIG. 7( a) is a diagram illustrating an example of the ranginginaccuracy due to δ₁ and δ₂ and insertion of ½ clock period time-offsetin device 102 clock in accordance with one embodiment of the invention.

FIG. 7( b) is a diagram illustrating an example of the relation betweentime-offset η and (η)_(1/2-) (with ½ clock-period offset) when ½<η<1.

FIG. 7( c) is a diagram illustrating an example of the relation betweentime-offset η and (η)_(1/2) (with ½ clock-period offset) where 0<η<½.

FIG. 8 is an operational flow diagram illustrating a process accordingto one embodiment for improving ranging accuracy in accordance with theexample embodiment illustrated in FIG. 7.

FIG. 9 is a diagram illustrating ({circumflex over(t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f₀ mapped in the (ε, η)plane for values of ε+η, ε−η, ε+η−½, and ε−η−½.

FIG. 10( a) is a diagram illustrating a case where the (ε, η) plane isseparated with respect to δ₁≦½, δ₁<½.

FIG. 10( b) is a diagram illustrating a case where the (ε, η) plane isseparated with respect to δ₂≧½, δ₂<½.

FIG. 10( c), is a diagram illustrating a case where the (ε, η) plane isseparated as a joint function of δ₁ and δ₂ on the basis of δ₁<½, δ₂<½,δ₁<½, δ₁≧½, δ₂<½, and δ₁≧½, δ₂≧½.

FIG. 11 is a diagram illustrating a summary of multiple rangingmeasurements with a one-half-clock-period offset in accordance with oneembodiment of the invention.

FIG. 12 is a diagram illustrating a probability density function of

$\frac{\delta_{1} + \delta_{2}}{2}$

for a given {D_(n/N)}_(n=0) ^(N−1).

FIG. 13 is a diagram illustrating a high level view of multiple rangingmeasurements with n/N clock-period offset measurements in accordancewith one embodiment of the invention.

FIG. 14 is a diagram illustrating an example case of instantaneousfrequency f_(i)(t) and clock timing t_(i)(t).

FIG. 15 is a diagram illustrating three sets of ranging measurementsthat can be used to estimate the clock-frequency offset in accordancewith one embodiment of the invention.

FIG. 16 illustrates a performance comparison of time of flight (in clockcycles) estimators using one embodiment of the present invention.

FIG. 17 is a diagram illustrating simulation results for a performancecomparison of ranging from N=1 to 10, where N=1 is a conventionaltechnique, and using N·f₀ sampling clock frequency.

FIG. 18 is a plot illustrating the improvement of the accuracy ofclock-frequency offset over the number of ranging measurement sets K inaccordance with one embodiment of the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Before describing the invention in detail, it is useful to describe anexample environment in which the invention can be implemented. Two-wayranging can be implemented in a number of environments and isparticularly useful in wireless networks due to the difficulty ofaccurately synchronizing the network devices. Two-way time-of-arrivalmeasurements can be used with asynchronous devices such as those in awireless network. This can be accomplished by calculating the round-trippropagation delay at a single device and then dividing the result by twoto yield an estimate of the one-way time of flight. The one way time offlight can be used with the propagation rate across the communicationchannel to determine the distance between the two devices. In thisdocument, the terms “measurement” and “estimate” are used somewhatinterchangeably. It shall be understood that the term “measurement” may,but does not necessarily, imply a certain degree precision. In fact ameasurement generally has a certain degree of imprecision based onsystem constraints such as, for example, clock resolution, uncertaintiesin propagation delay, system latencies, and the like. The same can besaid for the term “estimate,” which may itself be a measurement or maybe based on a measurement. As such, estimates may also have a certaindegree of precision or imprecision, depending on the system, applicationor other circumstances.

One example environment in which the invention can be implemented is awireless communication network in which multiple electronic devices (forexample, computers and computing devices, cellular telephones, personaldigital assistants, motion and still cameras, among others) cancommunicate and share data, content and other information with oneanother. One example of such a network is that specified by the MB-UWBstandard (within WiMedia and Multi-Band OFDM Alliance). Fromtime-to-time, the present invention is described herein in terms of awireless network or in terms of the MB-UWB standard. Description interms of these environments is provided to allow the various featuresand embodiments of the invention to be portrayed in the context of anexemplary application. After reading this description, it will becomeapparent to one of ordinary skill in the art how the invention can beimplemented in different and alternative environments. Indeed,applicability of the invention is not limited to a wireless network, noris it limited to the MB-UWB standard described as one implementation ofthe example environment.

FIG. 1 is a block diagram illustrating one possible configuration of awireless network that can serve as an example environment in which thepresent invention can be implemented. Referring now to FIG. 1, awireless network 1020 is provided to allow a plurality of electronicdevices to communicate with one another without the need for wires orcables between the devices. A wireless network 1020 can vary in coveragearea depending on a number of factors or parameters including, forexample, the transmit power levels and receive sensitivities of thevarious electronic devices associated with the network. Examples ofwireless networks can include the various IEEE and other standards asdescribed above, as well as other wireless network implementations.

With many applications, the wireless network 1020 operates in arelatively confined area, such as, for example, a home or an office. Theexample illustrated in FIG. 1 is an example of an implementation such asthat which may be found in a home or small office environment. Of coursewireless communication networks and communication networks in generalare found in many environments outside the home and office as well. Inthe example illustrated in FIG. 1, wireless network 1020 includes acommunication device to allow it to communicate with external networks.More particularly, in the illustrated example, wireless network 1020includes a modem 1040 to provide connectivity to an external networksuch as the Internet 1046, and a wireless access point 1042 that canprovide external connectivity to another network 1044.

Also illustrated in the example wireless network 1020 are portableelectronic devices such as a cellular telephone 1010 and a personaldigital assistant (PDA) 1012. Like the other electronic devicesillustrated in FIG. 1, cellular telephone 1010 and PDA 1012 cancommunicate with wireless network 1020 via the appropriate wirelessinterface. Additionally, these devices may be configured to furthercommunicate with an external network. For example, cellular telephone1010 is typically configured to communicate with a wide area wirelessnetwork by way of a base station.

Additionally, the example environment illustrated in FIG. 1 alsoincludes examples of home entertainment devices connected to wirelessnetwork 1020. In the illustrated example, electronic devices such as agaming console 1052, a video player 1054, a digital camera/camcorder1056, and a high-definition television 1058 are illustrated as beinginterconnected via wireless network 1020. For example, a digital cameraor camcorder 1056 can be utilized by a user to capture one or more stillpicture or motion video images. The captured images can be stored in alocal memory or storage device associated with digital camera orcamcorder 1056 and ultimately communicated to another electronic devicevia wireless network 1020. For example, the user may wish to provide adigital video stream to a high definition television set 1058 associatedwith wireless network 1020. As another example, the user may wish toupload one or more images from digital camera 1056 to his or herpersonal computer 1060 or to the Internet 1046. This can be accomplishedby wireless network 1020. Of course, wireless network 1020 can beutilized to provide data, content, and other information sharing on apeer-to-peer or other basis, as the provided examples serve toillustrate.

Also illustrated is a personal computer 1060 or other computing deviceconnected to wireless network 1020 via a wireless air interface. Asdepicted in the illustrated example, personal computer 1060 can alsoprovide connectivity to an external network such as the Internet 1046.

In the illustrated example, wireless network 1020 is implemented so asto provide wireless connectivity to the various electronic devicesassociated therewith. Wireless network 1020 allows these devices toshare data, content, and other information with one another acrosswireless network 1020. Typically, in such an environment, the electronicdevices would have the appropriate transmitter, receiver, or transceiverto allow communication via the air interface with other devicesassociated with wireless network 1020. These electronic devices mayconform to one or more appropriate wireless standards and, in fact,multiple standards may be in play within a given neighborhood.Electronic devices associated with the network typically also havecontrol logic configured to manage communications across the network andto manage the operational functionality of the electronic device. Suchcontrol logic can be implemented using hardware, software, or acombination thereof. For example, one or more processors, ASICs, PLAs,and other logic devices or components can be included with the device toimplement the desired features and functionality. Additionally, memoryor other data and information storage capacity can be included tofacilitate operation of the device and communication across the network.

Electronic devices operating as a part of wireless network 1020 aresometimes referred to herein as network devices, members or memberdevices of the network or devices associated with the network. In oneembodiment devices that communicate with a given network may be membersor they may merely be in communication with the network.

Having thus described an example environment in which the invention canbe implemented, various features and embodiments of the invention arenow described in further detail. Description may be provided in terms ofthis example environment for ease of discussion and understanding only.After reading the description herein, it will become apparent to one ofordinary skill in the art that the present invention can be implementedin any of a number of different communication environments (includingwired or wireless communication environments, and distributed ornon-distributed networks) operating with any of a number of differentelectronic devices.

Ranging between network devices can take place as one-way or two-wayranging. One-way ranging measures the time of flight of a signal orinformation, such as for example a packet or other transmission, from afirst network device to a second network device. Two-way rangingestimates the distance d between two network devices by measuring theround-trip time between the two devices and estimating the distancebetween the devices based on the measurements obtained from the startand arrival time of the packets. FIG. 2 is a diagram illustrating anexample configuration for two-way ranging. FIG. 3 is a diagramillustrating an example timeline for two-way ranging. FIG. 4 is anoperational flow diagram illustrating steps conducted in this exampletwo-way ranging process. Referring now to FIGS. 2, 3 and 4, in a step404, network device 102 transmits a packet 112 to a second networkdevice 104 at a time t₁. In a step 406, Packet 112 is received at device104 at a time t₂. In a step 408, device 104 processes the packet and,after a brief delay, transmits a response packet, packet 114, to device102 at a time t₃. Packets 112 and 114 can be the same packet with thesame information, or additional or different information can beprovided. In a step 410, at time t₄, device 102 receives packet 114. Ina step 412, the distance is computed. In one embodiment, device 102 cannow compute the distance to device 104 based on the simple formula:distance=rate*time. More particularly, given an estimate of time offlight t_(OF) of packet 112, and if c is the speed of propagation of anelectromagnetic wave, then the distance d=t_(OF)*c.

According to the convention adopted in FIG. 3, the absolute time whenthe reference (which is used to demark the start or arrival time) ofpacket 112 leaves device 102 is denoted t₁, and the recorded countervalue in device 102 at time t₁ is T₁. In one embodiment, the counter ofthe device counts the pulses of the device clock, which can besynchronized with sampling rate. At time t₂ packet 112 reaches device104 and the recorded counter value in device 104 at time t₂ is R₂. Theprocessing time in device 104 is t_(DEV) and the return packet 114leaves device 104 at time t₃ when the counter value in device 104 is T₂.Thus, t_(DEV)=t₃−t₂. Return packet 114 reaches device 102 at t₄ and therecorded counter value at time t₄ is R₁.

Therefore, given the above described conventions adopted in FIG. 3, theround trip delay is t_(RTD)=t₄−t₁ and the time of flight t_(OF) can bewritten as set forth in equation (1).

$\begin{matrix}{t_{OF} = {\frac{t_{RTD} - t_{DEV}}{2} = \frac{\left( {t_{4} - t_{1}} \right) - \left( {t_{3} - t_{2}} \right)}{2}}} & (1)\end{matrix}$

If all the timing instants are precisely recorded by the clock-countervalue, the time of flight can be expressed in terms of the clock countervalues as

$\begin{matrix}{{{t_{OF} = \frac{\left( {R_{1} - T_{1}} \right) - \left( {T_{2} - R_{2}} \right)}{2f_{0}}},}\;} & (2)\end{matrix}$

where f₀ is the sampling frequency of the device clock of device 102 anddevice 104. Note that equation (2) represents the estimate of the timeof flight in terms of counter values or the measurements made by thedevices upon transmission and reception of packets. Therefore, the timeof flight is ascertainable and does not need the time synchronization ofthe device clocks of device 102 and device 104 for this estimate.

Because the distance between two devices is given by d=t_(OF)*c, and cfor an electromagnetic wave in free space is very large (on the order of3*10¹⁰ cm/sec), a small error in the estimate of time of flighttypically can create a large error in estimated distance. There arevarious sources of such small errors that could impact the differencebetween the actual time of flight and the estimated time of flight usingequation (2). For example, the sampling instant of the device clock isdiscrete and therefore, there will be an error between the actual timeof event and the time when a measurement is taken, or, recorded as acounter value. For example, due to a discrete sampling interval, t2 andR2 may not exactly coincide in time, resulting in an inaccuracy. Thus,some conventional solutions have increased the sampling rate to reducesampling interval (i.e., increase the time resolution) and hence improvethe ranging accuracy.

In one embodiment of the present invention, additional rangingmeasurements are employed in time-of-arrival-based two-way rangingapplications to provide improved accuracy without necessitating a highersampling clock frequency. Particularly, in one embodiment, clock-offsetmeasurements are utilized in a two-way ranging application that improvesthe ranging accuracy without increasing the sampling clock-rate. In somecases, it may be possible to reduce the confidence interval (whilemaintaining the same level of confidence) of the estimate of the time offlight (in clock-cycles) by a factor of N when clock-period offsets n/N,for n=1, . . . , N−1, are used in the ranging measurements.

In accordance with one embodiment of the invention, the presence ofrelative clock drift (induced or otherwise) or offset measurementintervals between devices can be used in the measurement process tofurther refine the estimate. An analysis on the estimation of theclock-frequency offset in the presence of finite clock resolution canalso be used in one embodiment to enable reduction or elimination of thebias due to clock-frequency offset.

FIG. 5 is an operational flow diagram illustrating a process forimproving the accuracy of two-way ranging measurements in accordancewith one embodiment of the invention. Referring now to FIG. 5, in step502, a first ranging estimate between two devices (for example, devices102, 104 in a wireless network) is performed. In step 504 a time offlight estimate is made. In one embodiment, this measurement andestimate are made in accordance with the techniques described above withreference to FIGS. 2, 3 and 4.

In steps 506 and 508 a subsequent measurement and estimate are made,this time with a clock phase offset introduced. In one embodiment, theoffset is an offset of the clock of device 102 relative to the phase ofthe clock of device 102 in the prior measurement.

In step 512, the relationship between the first and second estimates oftime of flight is computed and is used to determine the refined estimateof time of flight in step 514. In one embodiment, the relationship usedis the difference between the first and second estimates. As illustratedby step 510, additional measurements and estimates can be made, and therelationships between those measurements (for example, differences) usedto further refine the time-of-flight estimate. In a preferredembodiment, when more than one subsequent measurement is used, eachsubsequent estimate is compared to the first estimate in determiningdifferences. In another embodiment, each subsequent estimate is comparedto its immediately preceding estimate to determine the differencebetween the two. As these examples illustrate, other techniques can beimplemented to determine relationships among the various measurements.

The difference provides more precise knowledge of the uncertainty due tofinite clock resolution and the refined estimator works by compensatingthe right amount of bias based on the difference. In one embodiment,this difference is computed in terms of cycles. This is described inmore detail below in accordance with the various embodiments of theinvention.

More particularly, in one embodiment, in step 514 the appropriate amountof compensated bias is obtained by mapping the differences between themeasured times of flight into a plane representing the offset and thefractional portion of the measurement, translating the regions of theplane into functions of uncertainties and bounding the uncertainties.Additionally, the confidence interval for a given measurement can becomputed and compared to previous measurements. Examples of this aredescribed in more detail below.

To better describe the invention and its features, a simplified case isfirst described in accordance with a few basic assumptions. Theseassumptions do not necessarily conform to real-world environments, butthey allow the effects of a finite clock resolution to be described andviewed, with minimal or no impact from other sources of error orinaccuracy. The assumptions are as follows: (1) the clock frequencies inthe two devices 102, 104 are the same; (2) there is no frequency driftin the clocks; (3) there is no time gap between the generation andtransmission of the reference signal at the transmitter, and similarlythere is no time gap between the detection and arrival of the referencesignal at the receiver; and (4) the detection of the arrived signal isperfect and detected in the next immediate tick of the sampling clockfrom its arrival instant. Because the clocks are assumed to operate atthe same frequency, the analysis can be performed with the measurementsof the same clock period (number of clock cycles). The remainingassumptions allow description in a simplified case without additionalsources of inaccuracy except the finite time resolution of the clock.Examples are also discussed later in this document that relax theseassumptions, and consider the effect of clock drift in rangingoperations.

FIG. 6 is a diagram illustrating a two-way-ranging operation betweendevices 102, 104, each operating at a finite clock resolution, with anoffset between the two clocks. Referring now to FIG. 6, the upper lineindicates the clock cycles of device 102, while the lower line indicatesthe clock cycles of device 104. As the diagram serves to illustrate, theinaccuracies δ₁ and δ₂ in the ranging measurements are due to finiteclock resolution. More particularly, the inaccuracies δ₁ and δ₂ in theranging measurements are due to the fact that in the example illustratedthe actual time of receipt falls in between clock cycles of thereceiving device. Therefore, receipt is not logged until the next clockinterval.

Referring still to FIG. 6, the set of measurements involved in thisembodiment of two-way-ranging includes T1, T2, R1 and R2 as describedabove with reference to FIG. 3. T1 and R1 represent the counter values(in clock cycles) of device 102 at the time of transmission andreception, respectively, of a packet at device 102. R2 and T2 representthe counter values (in clock cycles) of device 104 at the time ofreception and transmission, respectively, of a packet at device 104.

In the example illustrated, the clocks between the two devices areasynchronous and therefore, there is a constant time offset η betweenthe two clocks of devices 102, 104. The offset in this case is less thanone clock cycle, or 0<η<1. More particularly, in FIG. 6, η is thetime-offset between two clocks of device 102 and device 104 that existsduring the first transaction. T1 is the clock measurement (countervalue) occurring at the device 102 when the ranging measurement packet112 is transmitted (remembering assumption 3), R2 is the clockmeasurement at device 104 when packet 112 is received by device 104(also remembering assumption 3), and t_(OF) is the exact time of flightbetween the transmitter and the receiver. Note that due to finite clockresolution, δ₂ is the inaccuracy introduced in the measurement R2. Thatis, the packet is received at a time 602, but is not measured until atime R2. Therefore, R2−δ₂ is actual time 602 when packet 112 is received(or arrives at the receive antenna per assumption 3). In other words, δ₂is the amount of time elapsed between the actual time of receipt of thepacket at device 104 and the time at which that device's clock triggersdetection of the packet.

While δ₂, η, T1 and R2 are expressed here in the unit of clock cycles,the time of flight, t_(OF) is an actual elapsed time, for example, timeexpressed in seconds. Therefore, with f₀ as the clock frequency of thetwo devices, δ₂ can be expressed in terms of η as the difference betweenthe time the signal is measured as being received less the offset η andthe actual time it is received less the offset η. This is shown inequation (3) where the receive event 602 is subtracted from the measuredevent at R2, where R2 is expressed as a ceiling function of the receivetime 602 (i.e., the actual receive time 602 is rounded up to the nextclock interval at R2).

δ₂ =┌t _(OF) ·f ₀−η┐−(t _(OF) ·f ₀−η).   (3)

As stated above with reference to FIG. 3, T₂ is the clock measurement indevice 104 when the acknowledge packet, for example, return packet 114,leaves the transmit antenna of device 104. Note that t_(DEV)·f₀=T₂−R₂represents an integer number of clock cycles. R₁ is the measurement atdevice 102 when return packet 114 arrives at the receive antenna with aninaccuracy δ₁ expressed as:

$\begin{matrix}\begin{matrix}{\delta_{1} = {\left\lceil {\eta + {t_{OF} \cdot f_{0}} + \left\lceil {{t_{OF} \cdot f_{0}} - \eta} \right\rceil} \right\rceil - \left( {\eta + {t_{OF} \cdot f_{0}} + \left\lceil {{t_{OF} \cdot f_{0}} - \eta} \right\rceil} \right)}} \\{= {\left\lceil {\eta + {t_{OF} \cdot f_{0}}} \right\rceil - \left( {\eta + {t_{OF} \cdot f_{0}}} \right)}}\end{matrix} & (4)\end{matrix}$

Because the time of flight may not coincide with an exact integer numberof clock cycles, the actual number of cycles in the time of flight hasan integer portion and a fractional portion, ε. As such, the time offlight in cycles, t_(OF)·f₀, can be expressed ast_(OF)·f₀=(t_(OF)·f₀)_(int)+ε, where (t_(OF)·f₀)_(int) is the integernumber of the clock period and ε is the fractional portion of thetime-of-flight clock period, where ε is less than one clock cycle.

With this expression of the time of flight as a whole and fractionalportion, equations (4) and (3) can be further simplified. Moreparticularly, inaccuracy δ₁ can be expressed as the ceiling function ofthe sum of the fractional portion of the time-of-flight clock periodplus the offset, less the actual sum of these components as follows

δ₁=┌ε+η┐−(ε+η).   (5)

Likewise, δ₂ can be expressed as the ceiling function of the fractionalportion of the time-of-flight clock period minus the clock offset, lessthe actual difference of these components as follows

δ₂=┌ε−η┐−(ε−η).   (6)

Thus, δ₁ and δ₂ can be expressed independently of (t_(OF)·f₀)_(int).

Because the actual value of the fractional part of the time of flight,ε, is unknown and the clocks of the devices are not synchronized, ε andη are uniformly distributed over a range of 0 to 1. Because ε and η areindependent variables of uniform distribution, it can be proven usingprobability theory and it is understood by one of ordinary skill in theart that the two variables derived from them using equations (5) and(6), δ₁ and δ₂, are also uniformly distributed.

With the measurements T₁, R₁ in device 102 and T₂, R₂ in device 104, theestimate of number of clock cycles elapsed during time of flight{circumflex over (t)}_(OF) is determined by measuring the total roundtrip travel time in cycles, less the processing time at device 104 incycles and dividing this by two to get the number of cycles for aone-way trip as shown in equation (7). Another way to express theestimated number of clock cycles during time of flight, {circumflex over(t)}_(OF), is to express it in terms of the actual time of flight plusthe inaccuracies (i.e., the actual one-way time-of-flight cycles plus ½of the number of cycles due to round trip inaccuracies), as alsoillustrated in equation (7):

$\begin{matrix}\begin{matrix}{{{\hat{t}}_{OF} \cdot f_{0}} = \frac{\left( {R_{1} - T_{1}} \right) - \left( {T_{2} - R_{2}} \right)}{2}} \\{= {{t_{OF} \cdot f_{0}} + {\frac{\delta_{1} + \delta_{2}}{2}.}}}\end{matrix} & (7)\end{matrix}$

Because δ₁ and δ₂ are each less than one clock cycle in duration, (i.e.,0<δ₁<1 and 0≦δ₂<1), the uncertainty in the estimate {circumflex over(t)}_(OF) is less than 1 clock period. In other words, ({circumflex over(t)}_(OF)−t_(OF))·f₀<1. Further, from equation (7), it is evident thatwith the increase of the sampling clock-frequency f₀, the uncertainty ofthe estimate, {circumflex over (t)}_(OF), is reduced in an inverselyproportional manner.

Having thus described how an increase in sampling clock frequency canimprove the accuracy of ranging measurements, techniques for achievingimprovements in ranging accuracy without necessarily increasing theclock rate are now described. More particularly, in one embodiment, areduction similar to that obtained by increasing clocksampling-frequency can be obtained by implementing ranging techniquesthat incorporate additional ranging measurements with clock-periodtime-offsets introduced in one or more measurements. In one embodiment,one of the device clocks is offset relative to a prior measurement forsubsequent ranging operations. The offset may be purposely induced intothe system, or may be achieved by drift or other anomalies or factorsthat cause clocks to change over time. In one embodiment, the clockoffset is introduced in one device clock relative to the other deviceclock. Additionally, in one embodiment, the relative offset introducedbetween the two clocks may be considered to be less than one clockcycle, although greater offsets (greater than one or more clockcycle(s)) may be encountered and addressed as well.

First, consider an example communication system where data transmissionis assumed to occur at approximately the speed of light, c. Withc=3×10¹⁰ cm/sec, the estimate of the distance between two devices isgiven by

$\begin{matrix}\begin{matrix}{\hat{d} = {{\hat{t}}_{OF} \cdot c}} \\{= {{t_{OF} \cdot c} + {\frac{\delta_{1} + \delta_{2}}{2} \cdot \frac{c}{f_{0}}}}} \\{= {d + {\frac{\delta_{1} + \delta_{2}}{2} \cdot {\frac{c}{f_{0}}.}}}}\end{matrix} & (8)\end{matrix}$

Consider, for example, a system having a default minimum clock frequencyf₀=528 MHz. In this example, the uncertainty in the estimated distancebetween two devices can be as much as approximately 56.8 cm. To find thedistribution of uncertainty ν due to finite clock resolution, i.e.,ν:=(δ₁+δ₂)/2, consider that δ₁ and δ₂ are independent and thus thedistribution of δ₁+δ₂ is the convolution of two probability densityfunctions, and the probability density function ν:=(δ₁+δ₂)/2 istherefore triangular and given by:

${f_{V}(v)} = \left\{ \begin{matrix}{4v} & {0 \leq v \leq \frac{1}{2}} \\{{{- 4}v} + 4} & {\frac{1}{2} < v \leq 1.}\end{matrix} \right.$

Because the estimated number of cycles equals the actual number ofcycles plus the uncertainty, or {circumflex over(t)}_(OF)·f₀=t_(OF)·f₀+ν, an unbiased estimator {hacek over(t)}_(OF)·f₀={circumflex over (t)}_(OF)·f₀−E(ν)={circumflex over(t)}_(OF)·f₀−0.5 can be determined where E(ν), the mean of the randomvariable ν, is subtracted from the biased estimator. The distribution ofν can be exploited in finding a suitable confidence interval Δ such thatthere is a probability γ that the actual number of cycles, t_(OF) f₀,lies within ±Δ of the estimator time of flight. That is, the probabilitythat t_(OF)·f₀, lies between {hacek over (t)}_(OF)·f₀−Δ and {hacek over(t)}_(OF)·f₀+Δ is γ. Therefore, for a given ±Δ, this probability γ canbe calculated as shown in equation (9), where the actual number of clockcycles for the time of flight is bounded by an estimator time of flightplus the confidence interval ±Δ. Substituting E(ν) and solving for Δshows the confidence interval.

$\begin{matrix}{{{P\left( {\left( {{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} - \Delta} \right) \leq {t_{OF} \cdot f_{0}} \leq \left( {{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} + \Delta} \right)} \right)} = {\left. \gamma \Rightarrow{P\left( {\left( {{t_{OF} \cdot f_{0}} + 0.5 - \Delta} \right) \leq {{\hat{t}}_{OF} \cdot f_{0}} \leq \left( {{t_{OF} \cdot f_{0}} + 0.5 + \Delta} \right)} \right)} \right. = {\left. \gamma \Rightarrow{1 - \left( {1 - {2\Delta}} \right)^{2}} \right. = {\left. \gamma \Rightarrow\Delta \right. = \frac{1 \pm \sqrt{1 - \gamma}}{2}}}}},{0 \leq \Delta \leq \frac{1}{2}}} & (9)\end{matrix}$

Thus, the ranging estimate for the distance is given by {hacek over(d)}={hacek over (t)}_(OF)·c and the confidence interval of the rangingestimator {hacek over (d)} is denoted as Δ_(d), which is related to Δ asΔ_(d)=(±Δ·c)/f₀, where Δ and Δ_(d) are calculated for different valuesof γ and shown in Table 1. As this illustrates, there is a 99% level ofconfidence that the inaccuracy of the estimate is less than or equal to0.45 clock-cycle. At an example clock-frequency f₀=528 MHz, thisinaccuracy translates to 25.56 cm in distance.

TABLE 1 Confidence interval Δ of {hacek over (t)}_(OF) · f₀ fordifferent level of confidence Probability (Level of Confidence) γConfidence Interval ± Δ (in clock-periods or cycles) Confidence Interval(in cm) $\Delta_{d} = {{\pm \Delta} \cdot \frac{c}{f_{0}}}$ c = 3 × 10¹⁰cm/sec, f₀ = 528 × 10⁶ cycle/sec 1 0.5 28.40 0.99 0.45 25.56 0.9 0.3419.31 0.8 0.28 15.90

As stated above, in one embodiment, one or more subsequent measurementswith a relative clock-offset are used in two-way ranging to increase theaccuracy of the ranging. In particular, in accordance with oneembodiment, the confidence interval of the estimate of the time offlight (in clock-cycles) can be reduced by a factor of N withoutdecreasing the level of confidence when additional ranging measurementsfor a clock period offset of n/N, where n=1, . . . , N−1 are used. Tofacilitate description of this technique, it is described in terms of anexample embodiment where the clock offset introduced is roughly one-halfof a clock period. After the invention is described in terms of a ½period offset, the more general case of an n/N offset is describedbelow.

As stated above, in one embodiment ranging measurements are made with ½clock period offset with respect to the previous ranging measurements indevice 102 to reduce the uncertainty of the estimation of time offlight, t_(OF). FIG. 7 is a diagram illustrating two rangingmeasurements with ½ clock period offset according to one embodiment ofthe invention. More particularly, FIG. 7( a) illustrates the ranginginaccuracy due to δ₁ and δ₂ and insertion of ½ clock period time-offsetin device 102 clock, FIG. 7( b) illustrates the relation betweentime-offset η and (η)_(1/2) (with ½ clock-period offset) when ½<η<1, andFIG. 7( c) illustration the relation where 0<η<½.

FIG. 8 is an operational flow diagram illustrating a process forimproving ranging accuracy in accordance with the example embodimentillustrated in FIG. 7. Referring now to FIGS. 7 and 8, two measurementsare illustrated as a first measurement 702 and a second measurement 704.In a step 802, a first measurement of t_(OF) is made with clock ofdevice 102 and clock of device 104, wherein the clocks are asynchronousand have some offset η associated therewith. In one embodiment, thismeasurement can be made as described above with reference to FIG. 4.

In a step 804, a second measurement is conducted. For the secondmeasurement 704, the clock in device 102 is offset by ½ a clock periodrelative to the phase of its clock in the prior measurement 702. In ascenario where the clock in device 104 is assumed fixed with no drift,this offset is also relative to the clock in device 104. For thismeasurement, then, the time-offset between two clocks, denoted as(η)_(1/2), after introducing ½ clock period time-offset in the clock ofdevice 102 is now:

$\begin{matrix}{(\eta)_{1/2} = \left\{ \begin{matrix}{\eta - \frac{1}{2}} & {\eta \geq \frac{1}{2}} \\{\eta + \frac{1}{2}} & {\eta < \frac{1}{2}}\end{matrix} \right.} & (10)\end{matrix}$

The new time of flight, t_(OF), for this second measurement is computedas described above, but using timing measurements (T₁)_(1/2),(T₂)_(1/2), (R₁)_(1/2), and (R₂)_(1/2) as shown in FIG. 7.

Thus, the time of flight for the second measurement is estimated basedon the transmission and reception times of the packet as describedabove. This provides:

$\begin{matrix}{\begin{matrix}{{\left( {\hat{t}}_{OF} \right)_{1/2} \cdot f_{0}} = \frac{\left( {\left( R_{1} \right)_{1/2} - \left( T_{1} \right)_{1/2}} \right) - \left( {\left( T_{2} \right)_{1/2} - \left( R_{2} \right)_{1/2}} \right)}{2}} \\{{= {{t_{OF} \cdot f_{0}} + \frac{\left( \delta_{1} \right)_{1/2} + \left( \delta_{2} \right)_{1/2}}{2}}},}\end{matrix}{where}} & (11) \\{{\left( \delta_{1} \right)_{1/2} = {\left\lceil {ɛ + (\eta)_{1/2}} \right\rceil - \left( {ɛ + (\eta)_{1/2}} \right)}},{and}} & (12) \\{{\left( \delta_{2} \right)_{1/2} = {\left\lceil {ɛ - (\eta)_{1/2}} \right\rceil - \left( {ɛ - (\eta)_{1/2}} \right)}},} & (13)\end{matrix}$

with (η)_(1/2) as defined in equation (10).

In a step 806, the difference between the time of flight estimates isdetermined. In one embodiment, this is accomplished by subtractingequation (11) from equation (7), to obtain

$\begin{matrix}{{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}} = {\frac{\delta_{1} - \left( \delta_{1} \right)_{1/2}}{2} + {\frac{\delta_{2} - \left( \delta_{2} \right)_{1/2}}{2}.}}} & (14)\end{matrix}$

Substituting the values obtained from equations (5), (6), (12) and (13)into equation (14) yields.

$\begin{matrix}{{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}} = {\frac{1}{2}{\begin{pmatrix}{\left\lceil {ɛ + \eta} \right\rceil - \left\lceil {ɛ + (\eta)_{1/2}} \right\rceil +} \\{\left\lceil {ɛ - \eta} \right\rceil - \left\lceil {ɛ - (\eta)_{1/2}} \right\rceil}\end{pmatrix}.}}} & (15)\end{matrix}$

Substituting the value of (η)_(1/2) as defined in equation (10) intoequation (15), yields:

$\begin{matrix}{{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}} = \left\{ \begin{matrix}{\frac{1}{2}\left( {\left\lceil {ɛ + \eta} \right\rceil - \left\lceil {ɛ + \eta - \frac{1}{2}} \right\rceil + \left\lceil {ɛ - \eta} \right\rceil - \left\lceil {ɛ - \left( {\eta - \frac{1}{2}} \right)} \right\rceil} \right)} & {\eta \geq \frac{1}{2}} \\{\frac{1}{2}\left( {\left\lceil {ɛ + \eta} \right\rceil - \left\lceil {ɛ + \eta + \frac{1}{2}} \right\rceil + \left\lceil {ɛ - \eta} \right\rceil - \left\lceil {ɛ - \left( {\eta + \frac{1}{2}} \right)} \right\rceil} \right)} & {\eta < \frac{1}{2}}\end{matrix} \right.} & (16)\end{matrix}$

The expression of η<½ in (16) can be written as

$\begin{matrix}{{{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}} = {\frac{1}{2}\begin{pmatrix}{\left\lceil {ɛ + \eta} \right\rceil - \left\lceil {ɛ + \eta + 1 - \frac{1}{2}} \right\rceil +} \\{\left\lceil {ɛ - \eta} \right\rceil - \left\lceil {ɛ - \left( {\eta + 1 - \frac{1}{2}} \right)} \right\rceil}\end{pmatrix}}},{\eta < \frac{1}{2}}} \\{= {\frac{1}{2}\begin{pmatrix}{\left\lceil {ɛ + \eta} \right\rceil - \left\lceil {ɛ + \eta - \frac{1}{2}} \right\rceil +} \\{\left\lceil {ɛ - \eta} \right\rceil - \left\lceil {ɛ - \left( {\eta - \frac{1}{2}} \right)} \right\rceil}\end{pmatrix}}}\end{matrix}$

Thus, ({circumflex over (t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f₀can be expressed entirely in terms of the offset η and the fractionalportion of the time of flight ε as:

$\begin{matrix}{{{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}} = {\frac{1}{2}\begin{pmatrix}{\left\lceil {ɛ + \eta} \right\rceil - \left\lceil {ɛ + \eta - \frac{1}{2}} \right\rceil +} \\{\left\lceil {ɛ - \eta} \right\rceil - \left\lceil {ɛ - \left( {\eta - \frac{1}{2}} \right)} \right\rceil}\end{pmatrix}}},{0 \leq \eta < 1}} & (17)\end{matrix}$

which can be evaluated in terms of ε and η. In one embodiment, thisexpression can be evaluated in the (ε, η) plane.

In a step 808, a range of the inaccuracies, δ₁ and δ₂, is determined.FIG. 9 is a diagram illustrating ({circumflex over(t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f₀ mapped in the (δ, η)plane for values of ε+η, ε−η, ε+η−½, and ε−η−½. Because δ₁ and δ₂ aredetermined based on ceiling functions of ε, η operations, the analysiscan be somewhat simplified. Particularly, respective determinations ofthe ceiling functions of the operations ε+η, ε−η, ε+η−½, and ε−η−½ willbe either 0, 1 or 2. As such, the difference in measurements in cycles,D_(1/2)=^(({circumflex over (t)}) _(OF)−({circumflex over(t)}_(OF))_(1/2))·f₀, will be either −½, 0 or +½ as illustrated in FIG.9.

The different regions of ({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f₀ in the (ε, η) plane can be translated to thefunctions of δ₁ and δ₂ with the help of FIG. 10. FIGS. 10( a) and 10(b)illustrate the case where the (ε, η) plane is separated with respect toδ₁≧½, δ₁<½ and δ₂≧½, δ₂<½ respectively. FIG. 10( c), illustrates thecase where the (ε, η) plane is separated as a joint function of δ₁ andδ₂ on the basis of δ₁<½, δ₂<½, δ₁<½, δ₂≧½, δ₁≧½, δ₂<½, and δ₁≧½, δ₂≧½.Comparing FIG. (9) with FIG. 10( c), three cases can be determined. In afirst case, when ({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f₀=−½ it can be determined that 0<δ₁<½, 0<δ₂<½ and0<(δ₁+δ₂)/2<½ with a probability of one quarter. In a second case, when({circumflex over (t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f₀=0 itcan be determined that 0<δ₁<½, ½<δ₂<1, or ½<δ₁<1, 0<δ₂<½, and¼≦(δ₁+δ₂)/2¾, with probability of one half. In a third case, when({circumflex over (t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f₀=½ itcan be determined that δ₁≧½ and δ₂≧½, and ½<(δ₁+δ₂)/2<1 with aprobability of occurence of one quarter.

Therefore, by employing a one-half clock-period time-offset to one clockrelative to the other and knowing the difference between the twotime-of-flight measurements, ({circumflex over (t)}_(OF)−({circumflexover (t)}_(OF))_(1/2))·f₀, it can be determined whether (δ₁+δ₂)/2 isless than 0.5, or in between 0.25 and 0.75, or is greater than 0.5.Therefore, the maximum inaccuracy in the round-trip estimate is reducedto no more than one-half of a clock cycle. As such, the uncertainty ofthe measurement can be reduced by one-half of a clock period.

Knowing the difference between the two time-of-flight measurements (asdetermined in step 806), ({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f₀, in step 810, the refined estimate can becalculated and compared with the measurement case where there was notime offset.

The three cases of ({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f₀=−½, ({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f₀=0, and ({circumflex over (t)}_(OF)−({circumflexover (t)}_(OF))_(1/2))·f₀=½ are now discussed. With the first case,where the difference between the first measurement and the measurementwith a one-half clock period offset is minus one-half of a clock cycle,({circumflex over (t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f₀=−½,the values for the inaccuracies, δ₁ and δ₂, are as follows

0<δ₁<½

0<δ₂<½

Because δ₁ and δ₂ are independent, the probability density function ofδ₁+δ₂ can be determined as the convolution of two uniform probabilitydensity functions U(0,0.5) resulting in a triangular function. Thus, theprobability density function of ν=(δ₁+δ₂)/2 is given by:

${f_{V}(v)} = \left\{ \begin{matrix}{16v} & {0 \leq v \leq \frac{1}{4}} \\{8 - {16v}} & {\frac{1}{2} \leq v \leq {\frac{1}{2}.}}\end{matrix} \right.$

Thus an unbiased estimate can be formed as {hacek over(t)}_(OF)·f₀={circumflex over (t)}_(OF)·f₀−0.25, and the confidenceinterval, ±Δ, for confidence γ as

${{P\left( {{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} - \Delta} \leq {t_{OF} \cdot f_{0}} \leq {{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} + \Delta}} \right)} = {\left. \gamma \Rightarrow{{16\Delta^{2}} - {8\Delta} + \gamma} \right. = {\left. 0\Rightarrow\Delta \right. = \frac{1 \pm \sqrt{1 - \gamma}}{4}}}},{0 \leq \Delta \leq \frac{1}{4}}$

Values of the confidence intervals Δ for different γ are tabulatedbelow.

TABLE 2 Confidence interval Δ of {hacek over (t)}_(OF) for differentlevels of confidence with a half-period clock offset (Case I, II andIII),${{{where}\mspace{14mu} {the}\mspace{14mu} {confidence}\mspace{14mu} {interval}\mspace{14mu} \Delta_{d}} = {{{\pm \Delta} \cdot \frac{c}{f_{0}}}\mspace{14mu} {is}\mspace{14mu} {in}\mspace{14mu} {cm}}},{and}$c = 3 * 10¹⁰ cm/sec and f₀ = 528 * 10⁶ cycles/sec. Probability γ(confidence level) Confidence Interval ± Δ (in clock-period or cycle)Confidence Interval $\Delta_{d} = {{\pm \Delta} \cdot \frac{c}{f_{0}}}$1 0.25 14.20 0.99 0.225 12.78 0.9 0.1709 9.71 0.8 0.138 7.83

Similarly, when ({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(1/2))·f₀=0, we know that 0<δ₁<½ and ½≦δ₂<1 or 0<δ₂<½ and½≦δ₁<1. Thus, due to independence of δ₁ and δ₂ the PDF of δ₁+δ₂ is theconvolution of U(0,0.5) and U(0.5,1) resulting to the probabilitydensity function of ν=(δ₁+δ₂)/2 as

${f_{V}(v)} = \left\{ \begin{matrix}{{16v} - 4} & {0.25 \leq v \leq 0.5} \\{{{- 16}v} + 12} & {0.5 < v \leq {0.75.}}\end{matrix} \right.$

Consequently, an unbiased estimate can be made as {hacek over(t)}_(OF)·f₀={circumflex over (t)}_(OF)·f₀−0.5, and the confidenceinterval Δ calculated for a given confidence γ as discussed above withthe first case scenario. The obtained values of Δ are same as Case I andtabulated in Table 2.

With {circumflex over (t)}_(OF)−({circumflex over (t)}_(OF))_(1/2)=½,the viable ranges of δ₁ and δ₂ are ½≦δ₁<1 and ½≦δ₂<1. The probabilitydensity function of δ₁+δ₂ is the convolution of U(0.5,1), and U(0.5,1),and accordingly the probability density function of ν=(δ₁+δ₂)/2 is givenby

${f_{V}(v)} = \left\{ \begin{matrix}{{16v} - 0} & {0.5 \leq v \leq 0.75} \\{{{- 16}v} + 16} & {0.75 < v \leq 1.}\end{matrix} \right.$

The unbiased estimate is {hacek over (t)}_(OF)·f₀={circumflex over(t)}_(OF)·f₀−0.75 and confidence intervals of Δ for different confidenceγ are same as the Case I and II and are tabulated in Table 2. As Table 2illustrates, employing subsequent measurements with a one-half of aclock-cycle time offset reduces the confidence interval by one half fora given confidence. That is, the uncertainty in the estimate that arisesdue to a finite clock resolution is reduced by one half. The rangingalgorithm with one-half-clock-period offset measurements is summarizedin FIG. 11. Referring now to FIG. 11, a first measurement set is taken1102 to estimate {circumflex over (t)}_(OF). A second measurement set1104 is taken at ½ clock cycle offset to estimate ({circumflex over(t)}_(OF))_(1/2). These measurements are used to compute the refinedestimate 1106 as follows:

${{if}\mspace{14mu} D_{1/2}} = {{2{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}}} = {\left. 1\Rightarrow{\overset{\Cup}{t}}_{OF} \right. = {{\hat{t}}_{OF} - \frac{3}{4}}}}$${{if}\mspace{14mu} D_{1/2}} = {{2{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}}} = {\left. 0\Rightarrow{\overset{\Cup}{t}}_{OF} \right. = {{\hat{t}}_{OF} - \frac{1}{2}}}}$${{if}\mspace{14mu} D_{1/2}} = {{2{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{1/2}} \right) \cdot f_{0}}} = {\left. {- 1}\Rightarrow{\overset{\Cup}{t}}_{OF} \right. = {{\hat{t}}_{OF} - {\frac{1}{4}.}}}}$

These refined estimates can be generalized as

if D _(1/2)=2({circumflex over (t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f ₀=1

{hacek over (t)} _(OF) ·f ₀ ={circumflex over (t)} _(OF) ·f ₀ +c ₁

if D _(1/2)=2({circumflex over (t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f ₀=0

{hacek over (t)} _(OF) ·f ₀ ={circumflex over (t)} _(OF) ·f ₀ +c ₂

if D _(1/2)=2({circumflex over (t)}_(OF)−({circumflex over (t)}_(OF))_(1/2))·f ₀−−1

{hacek over (t)} _(OF) ·f ₀ ={circumflex over (t)} _(OF) ·f ₀ +c ₃

where c₁, c₂ and c₃ are constants.

Having thus considered a specific instance where the clock offsetbetween device clocks is one half of a clock period (in other words, N=2and 1/N=½), the more general case of n/N is now described. Moreparticularly, the case where ranging measurements with n/N, n=0, . . . ,N−1, clock-offsets are considered for any integer value of N≧1 withn=0,1,2, . . . , N−1 where n=0 corresponds to the case with noadditional clock-offset. Thus, with n/N clock-period time-offset betweendevices 102, 104, the relationship of time-offset between two devices inequation (10) becomes

$\begin{matrix}{(\eta)_{n/N} = \left\{ {\begin{matrix}{n - \frac{n}{N}} & {\eta \geq \frac{n}{N}} \\{1 + \eta - \frac{n}{N}} & {\eta < \frac{n}{N}}\end{matrix},{n = 0},\ldots \mspace{14mu},{N - 1}} \right.} & (18)\end{matrix}$

where (η)_(n/N) is the clock-offset between two devices with n/Nclock-offset introduced between the devices and with n=0, (η)_(n/N)=ηrepresenting the initial clock-offset that is present between thedevices prior to any additional clock-offset measurements.

From a convention perspective, let ({circumflex over (t)}_(OF))_(n/N) bethe estimated time of flight using an n/N clock-offset. Thus, with themeasurement set (T₁)_(n/N), (R₁)_(n/N), (T₂)_(n/N) and (R₂)_(n/N),({circumflex over (t)}_(OF))_(n/N) in cycles can be written as

$\begin{matrix}\begin{matrix}{{\left( {\hat{t}}_{OF} \right)_{n/N} \cdot f_{0}} = \frac{\left( {\left( R_{1} \right)_{n/N} - \left( T_{1} \right)_{n/N}} \right) - \left( {\left( T_{2} \right)_{n/N} - \left( R_{2} \right)_{n/N}} \right)}{2}} \\{{= {{t_{OF} \cdot f_{0}} + \frac{\left( \delta_{1} \right)_{n/N} + \left( \delta_{2} \right)_{n/N}}{2}}},}\end{matrix} & (19)\end{matrix}$

where (δ₁)_(n/N)=┌ε+(η)_(n/N)┐−(ε+(η)_(n/N)) and(δ₂)_(n/N)=┌ε−(η)_(n/N)┐−(ε−(η)_(n/N)).

Subtracting equation (19) from equation (7) yields the differencebetween the two measurements in terms of clock cycles as shown inequation 20.

$\begin{matrix}{{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{n/N}} \right) \cdot f_{0}} = {\frac{\delta_{1} - \left( \delta_{1} \right)_{n/N}}{2} + {\frac{\delta_{2} - \left( \delta_{2} \right)_{n/N}}{2}.}}} & (20)\end{matrix}$

Substituting δ₁, δ₂, (δ₁)_(n/N) and (δ₂)_(n/N) into equation (20),yields:

$\begin{matrix}{\begin{matrix}{D_{n/N}\overset{\Delta}{=}{2{\left( {{\hat{t}}_{OF} - \left( {\hat{t}}_{OF} \right)_{n/N}} \right) \cdot f_{0}}}} \\{{= {\left\lceil {ɛ + \eta} \right\rceil - \left\lceil {ɛ + \eta - \frac{n}{N}} \right\rceil + \left\lceil {ɛ - \eta} \right\rceil - \left\lceil {ɛ - \left( {\eta - \frac{n}{N}} \right)} \right\rceil}},}\end{matrix}{0 \leq \eta < 1}} & (21)\end{matrix}$

with n=0, D_(n/N)=0. To evaluate the expression of equation (21), it isnoted, as described above that the ceiling functions of mathematicaloperations of the offset, η, and the fractional portion of the time offlight, ε, will take on discrete values as shown in equations 22, 23, 24and 25.

$\begin{matrix}{\left\lceil {ɛ + \eta} \right\rceil = \left\{ \begin{matrix}1 & {0 < {ɛ + \eta} \leq 1} \\2 & {1 < {ɛ + \eta} < 2}\end{matrix} \right.} & (22) \\{\left\lceil {ɛ - \eta} \right\rceil = \left\{ \begin{matrix}0 & {{- 1} < {ɛ - \eta} \leq 0} \\1 & {0 < {ɛ - \eta} < 1}\end{matrix} \right.} & (23) \\{\left\lceil {ɛ + \eta - \frac{n}{N}} \right\rceil = \left\{ \begin{matrix}0 & {0 \leq {ɛ + \eta} \leq \frac{n}{N}} \\1 & {\frac{n}{N} < {ɛ + \eta} \leq {1 + \frac{n}{N}}} \\2 & {{1 + \frac{n}{N}} < {ɛ + \eta} < 2}\end{matrix} \right.} & (24) \\{\left\lceil {ɛ - \eta + \frac{n}{N}} \right\rceil = \left\{ \begin{matrix}0 & {{- 1} \leq {ɛ - \eta} \leq {- \frac{n}{N}}} \\1 & {{- \frac{n}{N}} < {ɛ - \eta} \leq {1 - \frac{n}{N}}} \\2 & {{1 - \frac{n}{N}} < {ɛ - \eta} < 1.}\end{matrix} \right.} & (25)\end{matrix}$

Thus, using (22), (24) and (4), yields

$\begin{matrix}{{\left\lceil {ɛ + \eta} \right\rceil - \left\lceil {ɛ + \eta - \frac{n}{N}} \right\rceil} = \left\{ \begin{matrix}1 & {0 < {ɛ + \eta} \leq \frac{n}{N}} & {{1 - \frac{n}{N}} \leq \delta_{1} < 1} \\0 & {\frac{n}{N} < {ɛ + \eta} \leq 1} & {0 \leq \delta_{1} < {1 - \frac{n}{N}}} \\1 & {1 < {ɛ + \eta} \leq {1 + \frac{n}{N}}} & {{1 - \frac{n}{N}} \leq \delta_{1} < 1} \\0 & {{1 + \frac{n}{N}} < {ɛ + \eta} < 2} & {0 < \delta_{1} < {1 - {\frac{n}{N}.}}}\end{matrix} \right.} & {(26).}\end{matrix}$

Similarly, using (23), (25) and (6), yields

$\begin{matrix}{{\left\lceil {ɛ - \eta} \right\rceil - \left\lceil {ɛ - \eta + \frac{n}{N}} \right\rceil} = \left\{ \begin{matrix}0 & {{- 1} < {ɛ - \eta} \leq {- \frac{n}{N}}} & {\frac{n}{N} \leq \delta_{2} < 1} \\{- 1} & {{- \frac{n}{N}} < {ɛ - \eta} \leq 0} & {0 \leq \delta_{2} < \frac{n}{N}} \\0 & {0 < {ɛ - \eta} \leq {1 - \frac{n}{N}}} & {\frac{n}{N} \leq \delta_{2} < {1\cdots}} \\{- 1} & {{1 - \frac{n}{N}} < {ɛ - \eta} < 1} & {0 < \delta_{2} < {\frac{n}{N}.}}\end{matrix} \right.} & (27)\end{matrix}$

Therefore, using (26) and (27), D_(n/N) can be calculated in equation(21) as outlined in Table 3, below. Note that for different values ofD_(n/N) at each η, the sequence D_((N−1)/N), D_((N−2)/N), . . . ,D_(1/N) obtained from the ranging measurements with offsets (N−1)/N, . .. , 1/N, respectively, does not include all the combination of thevalues (1, 0, 0, −1) tabulated in Table 3. Rather, it includes onlythose sequences that yields a valid overall domain of δ₁ and δ₂satisfying all the individual domains at each value of η.

TABLE 3 Possible values of Dn/N Domain of Domain of Domain of Domain ofDomain of Domain of Domain of Values δ₁ and δ₂ δ₁ and δ₂ δ₁ and δ₂ δ₁and δ₂ δ₁ and δ₂ δ₁ and δ₂ δ₁ and δ₂ of Dn/N with D_(n/N) withD_((N−1)/N) with D_((N−2)/N) with D_((N−3)/N) . . . with D_(3/N) withD_(n/N) with D_(1/N) 1 ${1 - \frac{n}{N}} \leq \delta_{1} < 1$$\frac{1}{N} \leq \delta_{1} < 1$ $\frac{2}{N} \leq \delta_{1} < 1$$\frac{3}{N} \leq \delta_{1} < 1$ . . .${1 - \frac{3}{N}} \leq \delta_{1} < 1$${1 - \frac{2}{N}} \leq \delta_{1} < 1$${1 - \frac{1}{N}} \leq \delta_{1} < 1$$\frac{n}{N} \leq \delta_{2} < 1$${1 - \frac{1}{N}} \leq \delta_{2} < 1$${1 - \frac{2}{N}} \leq \delta_{2} < 1$${1 - \frac{3}{N}} \leq \delta_{2} < 1$$\frac{3}{N} \leq \delta_{2} < 1$ $\frac{2}{N} \leq \delta_{2} < 1$$\frac{1}{N} \leq \delta_{2} < 1$ 0${1 - \frac{n}{N}} \leq \delta_{1} < 1$$\frac{1}{N} \leq \delta_{1} < 1$ $\frac{2}{N} \leq \delta_{1} < 1$$\frac{3}{N} \leq \delta_{1} < 1$ . . .${1 - \frac{3}{N}} \leq \delta_{1} < 1$${1 - \frac{2}{N}} \leq \delta_{1} < 1$${1 - \frac{1}{N}} \leq \delta_{1} < 1$ $0 < \delta_{2} < \frac{n}{N}$$0 < \delta_{2} < {1 - \frac{1}{N}}$$0 < \delta_{2} < {1 - \frac{2}{N}}$$0 < \delta_{2} < {1 - \frac{3}{N}}$ $0 < \delta_{2} < \frac{3}{N}$$0 < \delta_{2} < \frac{2}{N}$ $0 < \delta_{2} < \frac{1}{N}$ 0$0 < \delta_{1} < {1 - \frac{n}{N}}$ $0 < \delta_{1} < \frac{1}{N}$$0 < \delta_{1} < \frac{2}{N}$ $0 < \delta_{1} < \frac{3}{N}$ . . .$0 < \delta_{1} < {1 - \frac{3}{N}}$$0 < \delta_{1} < {1 - \frac{2}{N}}$$0 < \delta_{1} < {1 - \frac{1}{N}}$ $\frac{n}{N} \leq \delta_{2} < 1$${1 - \frac{1}{N}} \leq \delta_{2} < 1$${1 - \frac{2}{N}} \leq \delta_{2} < 1$${1 - \frac{3}{N}} \leq \delta_{2} < 1$$\frac{3}{N} \leq \delta_{2} < 1$ $\frac{2}{N} \leq \delta_{2} < 1$$\frac{1}{N} \leq \delta_{2} < 1$ −1$0 < \delta_{1} < {1 - \frac{n}{N}}$ $0 < \delta_{1} < \frac{1}{N}$$0 < \delta_{1} < \frac{2}{N}$ $0 < \delta_{1} < \frac{3}{N}$ . . .$0 < \delta_{1} < {1 - \frac{3}{N}}$$0 < \delta_{1} < {1 - \frac{2}{N}}$$0 < \delta_{1} < {1 - \frac{1}{N}}$ $0 < \delta_{2} < \frac{n}{N}$$0 < \delta_{2} < {1 - \frac{1}{N}}$$0 < \delta_{2} < {1 - \frac{2}{N}}$$0 < \delta_{2} < {1 - \frac{3}{N}}$ . . .$0 < \delta_{2} < \frac{3}{N}$ $0 < \delta_{2} < \frac{2}{N}$$0 < \delta_{2} < \frac{1}{N}$

Table 4 illustrates all such sequences with their valid domain of δ₁+δ₂,and (δ₁+δ₂)/2. Because δ₁ and δ₂ are independent, for a given validsequence, the probability density function of (δ₁+δ₂)/2 is triangular asshown in FIG. 12. Therefore, using n/N, n=0, . . . , N−1 clock-offsetmeasurements, the refined estimate of the time of flight (in cycles) isgiven by

$\begin{matrix}{{{\left( {\overset{\Cup}{t}}_{OF} \right)_{N} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \left( {{\frac{1}{2N}\left( {\sum\limits_{n = 0}^{N - 1}D_{n/N}} \right)} + \frac{1}{2}} \right)}},} & (28)\end{matrix}$

where {circumflex over (t)}_(OF) is the coarse estimate of time offlight (in cycles) as obtained in (7) without any clock-offsetmeasurements. This can be written in the more general case as

${\left( {\overset{\Cup}{t}}_{OF} \right)_{N} \cdot f_{0}} = {\beta \cdot \left\lbrack {{{\hat{t}}_{OF} \cdot f_{0}} - {\alpha \cdot \left( {{\frac{1}{2N}\left( {\sum\limits_{n = 0}^{N - 1}D_{n/N}} \right)} + \frac{1}{2}} \right)} + c} \right\rbrack}$

where α, β and c are constants, noting that in equation (28) α=1, β=1and c=0.

Accordingly, the confidence interval in (7) around ({hacek over(t)}_(OF))_(N)·f₀ for confidence level γ is given by

$\begin{matrix}{{{P\left( {{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} - \Delta} \leq {t_{OF} \cdot f_{0}} \leq {{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} + \Delta}} \right)} = {\left. \gamma \Rightarrow {{4N^{2}\Delta^{2}} - {4N\; \Delta} + \gamma} \right. = {\left. 0\Rightarrow \Delta \right. = \frac{1 \pm \sqrt{1 - \gamma}}{2N}}}},{0 \leq \Delta \leq {\frac{1}{2N}.}}} & {(29).}\end{matrix}$

Therefore, it is apparent from equation (29) that as N increases, n/N,n=0, . . . , N−1 clock period clock-offset measurements are able todecrease the confidence interval Δ by N times for the same level ofconfidence. That is, the uncertainty of the estimate is reduced by Ntimes, which is roughly equivalent to increasing the sampling clockfrequency by a factor of N.

TABLE 4 Different valid realization of the observed sequence ofD_((N−1)/N)D_((N−2)/N) . . . D_(2/N)D_(1/N) with corresponding domain ofδ₁ and δ₂ , (δ₁ + δ₂)/2 and {hacek over (t)}_(OF) · f₀. Note that table4 is divided into two sections to fit on the page: Section onecomprising columns 1-6 and section two comprising columns 7 and 8. Table4 should be read as if section two (columns 7 and 8) were reproducedalong side section one. (1) (2) (3) . . . (4) (5) (6) D_((N−1)/N)D_((N−2)/N) D_((N−3)/N) . . . D_(3/N) D_(2/N) D_(1/N) 1 1 1 . . . 1 1 11 1 1 . . . 1 1 0 0 1 1 . . . 1 1 1 1 1 1 . . . 1 0 0 0 1 1 . . . 1 1 00 0 1 . . . 1 1 1 ⋮ ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ 0 0 0 . . . 0 0 0 ⋮ ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ 0 0 −1 .. . −1 −1 −1 0 −1 −1 . . . −1 −1 0 −1 −1 −1 . . . −1 0 0 0 −1 −1 . . .−1 −1 −1 −1 −1 −1 . . . −1 −1 0 −1 −1 −1 −1 −1 −1 −1 (7) (8)Sequence-specific valid domain of Domain of δ₁ and δ₂ (δ₁ + δ₂)/2 and{hacek over (t)}_(OF) ${{1 - \frac{1}{N}} \leq \delta_{1}},{< 1}$$\quad{{\frac{{2N} - 2}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < \frac{2N}{2N}},\quad}$${1 - \frac{1}{N}} \leq \delta_{2} < 1$${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 1}{2N}}$${1 - \frac{2}{N}} \leq \delta_{1} < {1 - \frac{1}{N}}$$\frac{{2N} - 3}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < {\frac{{2N} - 1}{2N}\quad}$${1 - \frac{1}{N}} \leq \delta_{2} < 1$${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 2}{2N}}$${1 - \frac{1}{N}} \leq \delta_{1} < 1$$\frac{{2N} - 3}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < {\frac{{2N} - 1}{2N}\quad}$${1 - \frac{2}{N}} \leq \delta_{2} < {1 - \frac{1}{N}}$${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 2}{2N}}$${1 - \frac{3}{N}} \leq \delta_{1} < {1 - \frac{2}{N}}$$\frac{{2N} - 4}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < {\frac{{2N} - 2}{2N}\quad}$${1 - \frac{1}{N}} \leq \delta_{2} < 1$${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 3}{2N}}$${1 - \frac{2}{N}} \leq \delta_{1} < {1 - \frac{1}{N}}$$\frac{{2N} - 4}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < {\frac{{2N} - 2}{2N}\quad}$${1 - \frac{2}{N}} \leq \delta_{2} < {1 - \frac{1}{N}}$${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 3}{2N}}$${1 - \frac{1}{N}} \leq \delta_{1} < 1$$\frac{{2N} - 4}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < {\frac{{2N} - 2}{2N}\quad}$${1 - \frac{3}{N}} \leq \delta_{2} < {1 - \frac{2}{N}}$${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 3}{2N}}$⋮ ⋮ $\begin{matrix}{\frac{N - 1}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < \frac{N + 2}{2N}} \\{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{1}{2}}}\end{matrix}\quad$ ⋮ ⋮${\frac{2}{N} \leq \delta_{1} < \frac{3}{N}},{0 \leq \delta_{2} < \frac{1}{N}}$${\frac{2}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < \frac{4}{2N}},{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{3}{2N}}}$${\frac{1}{N} \leq \delta_{1} < \frac{2}{N}},{\frac{1}{N} \leq \delta_{2} < \frac{2}{N}}$${\frac{2}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < \frac{4}{2N}},{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{3}{2N}}}$${0 \leq \delta_{1} < \frac{1}{N}},{\frac{2}{N} \leq \delta_{2} < \frac{3}{N}}$${\frac{2}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < \frac{4}{2N}},{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{3}{2N}}}$${\frac{1}{N} \leq \delta_{1} < \frac{2}{N}},{0 \leq \delta_{2} < \frac{1}{N}}$${\frac{1}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < \frac{3}{2N}},{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{2}{2N}}}$${0 < \delta_{1} < \frac{1}{N}},{\frac{1}{N} \leq \delta_{2} < \frac{2}{N}}$${\frac{1}{2N} \leq \frac{\delta_{1} + \delta_{2}}{2} < \frac{3}{2N}},{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{2}{2N}}}$${0 < \delta_{1} < \frac{1}{N}},{0 < \delta_{2} < \frac{1}{N}}$${0 < \frac{\delta_{1} + \delta_{2}}{2} < \frac{2}{2N}},{{{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{1}{2N}}}$

The confidence interval with n/N offset measurements is shown in Table5, which illustrates the reduction of the confidence interval by factorof N for given level of confidence. In the embodiments illustrated intable 5, N=1 represents the case where no additional time-offsetmeasurements are made. The block diagram for the half-clock-periodoffset shown in FIG. 11 is modified as shown in FIG. 13 forn/N-clock-period offset measurements.

The fundamental results can be summarized in the following theorem.

Theorem-1: When the error due to finite clock resolution in two-wayranging is modeled as δ₁εU(0,1) and δ₂εU(0,1) as in (5) and (6),respectively, the coarse estimate of time of flight (in clock cycleswith f₀ as sampling clock frequency) is given by {circumflex over(t)}_(OF)·f₀=t_(OF)·f₀+(δ₁+δ₂)/2, and the estimate of time of flightwith n/N, n=0, . . . , N−1 clock-period offset introduced in the devicethat initiates the ranging measurement is given by ({circumflex over(t)}_(OF))_(n/N)·f₀=t_(OF)·f₀+((δ₁)_(n/N)+(δ₂)_(n/N))/2. The case of n=0refers to the initial measurement without additional clock phase offsetas given in equation (7). The fine estimate of time of flight is givenby

${{\left( {\overset{\Cup}{t}}_{OF} \right)_{N} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - {{\left( {{\sum\limits_{n = 0}^{N - 1}D_{n/N}} + N} \right)/2}N}}},$

where D_(n/N)=2({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(n/N))·f₀ with n=0, D_(n/N)=0 and confidence intervalα=(1±√{square root over (1−γ)})/2N, 0≦Δ≦½N.

TABLE 5 Confidence interval Δ of {hacek over (t)}_(OF) · f₀ differentlevel of confidence Probability γ Confidence Interval ± Δ (inclock-period or cycle) Confidence Interval$\Delta_{d} = {{{\pm \Delta} \cdot \frac{c}{f_{0}}}\mspace{11mu} \left( {{in}\mspace{14mu} {cm}} \right)}$c = 3 × 10¹⁰ cm/sec, f₀ = 528 × 10⁶ cycle/sec 1  0.5/N  28.4/N 0.990.45/N 25.56/N 0.9 0.34/N 19.31/N 0.8 0.28/N  15.9/N

FIG. 13 is a diagram illustrating a high level view of multiple rangingmeasurements with n/N clock-period offset measurements in accordancewith one embodiment of the invention. The operation illustrated in FIG.13 is similar to that shown in FIG. 11, with a distinction being thatFIG. 13 illustrates the general case of n/N including the no-offset casewith n=0 and N=1, where FIG. 11 illustrates the specific case where N=2.As shown in FIG. 13, measurement set 1 1302 consists of only the firstmeasurement of time of flight without any additional offset, whereas,measurement set 2 1304 contains all the measurements with offsets n/N,with 0,1, . . . , N−1, where n=0 corresponds to no additional offset.

The above discussion described measurements under the assumption thatthere was no clock drift between the devices 102, 104. Now described arescenarios where clock drift is introduced into the ranging process.

Before presenting the analysis that captures the effect of clock drifton ranging in the presence of finite clock resolution, the potentialsources of clock drift are briefly reviewed. Time scale in the clocks isdefined by the period of basic oscillation of the frequency-determiningelement, for example, the crystal in the case of a quartz clock, and theoscillation of atoms in the case of an atomic clock. Thus, a clock canbe viewed as a numerical integrator of a periodic signal produced by anoscillator, and in one embodiment the timekeeping function isimplemented by simply counting cycles.

The Frequency of such an oscillator is subject to variation due to anumber of factors such as, for example, temperature variations andaging. The instantaneous frequency of the oscillator at actual time t,f_(i)(t), is given by

f _(i)(t)=f ₀ +Δf+D _(f)·(t−t ₀)+ε(t),   (30)

where f₀ is the nominal oscillator frequency, Δf is the frequency bias,D_(f) is the frequency drift in Hz/sec, t₀ is the reference epoch, andδ(t) stands for nonsystematic, unmodeled random frequency errors. Forease of discussion, the frequency drift is assumed to be constant withtime. Therefore, total number of clock cycles at time t is given by

N(t)=∫₀ f _(i)(t)dt,

and accordingly, observed clock timing t_(i)(t) at time t is

$\begin{matrix}\begin{matrix}{{{t_{i}(t)} - t_{0i}} = {\frac{1}{f_{0}}{N(t)}}} \\{= {\frac{1}{f_{0}}{\int_{t_{0}}^{t}{{f_{i}(t)}\ {t}}}}} \\{{= {t - t_{0} + \frac{\Delta \; {f\left( {t - t_{0}} \right)}}{f_{0}} + \frac{{D_{f}\left( {t - t_{0}} \right)}^{2}}{2f_{0}} + {\frac{1}{f_{0}}{\int_{t_{0}}^{t}{{ɛ(t)}\ {t}}}}}},}\end{matrix} & (31)\end{matrix}$

where t_(0i) is the clock timing at the reference epoch t₀.

FIG. 14 is a diagram illustrating an example case of instantaneousfrequency f_(i)(t) and clock timing t_(i)(t). Referring now to FIG. 14,the dotted lines represent the parts of frequency f_(i)(t) as determinedin equation (30) and the solid lines represent clock timing t_(i)(t) asdetermined in equation (31).

For the remainder of this analysis, assume that the D_(f)=0 and ε(t)=0,and thus using equation (31), the clock-inaccuracy in time can beexpressed as:

${{{t_{i}(t)} - t} = {\left( {t_{0i} - t_{0}} \right) + {\rho \left( {t - t_{0}} \right)}}},{\rho = {\frac{\Delta \; f}{f_{0}}.}}$

Therefore, the clock inaccuracy in time is due to clock offset t_(0i)−t₀(equivalent to δ₁ and δ₂ inaccuracy in ranging) at the starting epochand clock drift, which is quantified by ρ(t−t₀). Further, the clockdrift is caused due to the presence of clock-frequency offset Δf.

In the previous section, the effect on ranging of a finite clockresolution that causes time-offset δ₁ and δ₂ was described. Thefollowing discussion provides an analysis that considers both theeffects of finite clock resolution and clock-frequency offset uponranging. Let n be the total number of cycles counted in device 102during the measurements between R₁ and T₁, i.e., n=R₁−T₁. Similarlym=T₂−R₂=T_(DEV) represents the number of clock cycles elapsed in device104. Further, let f₀+Δf₁ and f₀+Δf₂ represent the frequency of theclocks in device 102 and device 104 respectively, where f₀ is nominalfrequency of the clocks and Δf₁ and Δf₂ are the frequency offset of theclocks in device 102 and device 104, respectively. Therefore, t_(OF) inseconds can be expressed as

$\begin{matrix}\begin{matrix}{t_{OF} = {{\frac{1}{2}\left( {\frac{n}{f_{0} + {\Delta \; f_{1}}} - \frac{\delta_{1}}{f_{0} + {\Delta \; f_{1}}}} \right)} - {\frac{1}{2}\left( {\frac{m}{f_{0} + {\Delta \; f_{2}}} + \frac{\delta_{1}}{f_{0} + {\Delta \; f_{2}}}} \right)}}} \\{= {{\frac{n - \delta_{1}}{2f_{0}}\left( {1 + \frac{\Delta \; f_{1}}{f_{0}}} \right)^{- 1}} - {\frac{m + \delta_{2}}{2f_{0}}\left( {1 + \frac{\Delta \; f_{2}}{f_{0}}} \right)^{- 1}}}} \\{\approx {{\frac{n - \delta_{1}}{2f_{0}}\left( {1 - \frac{\Delta \; f_{1}}{f_{0}}} \right)} - {\frac{m + \delta_{2}}{2f_{0}}\left( {1 - \frac{\Delta \; f_{2}}{f_{0}}} \right)}}}\end{matrix} & (32) \\\begin{matrix}{t_{OF} = {{\frac{1}{2f_{0}}\left( {n - m} \right)} - {\frac{1}{2f_{0}}\left( {\delta_{1} + \delta_{2}} \right)} - {\frac{1}{2f_{0}^{2}}\begin{pmatrix}{{\left( {n - \delta_{1}} \right)\Delta \; f_{1}} -} \\{\left( {m + \delta_{2}} \right)\Delta \; f_{2}}\end{pmatrix}}}} \\{= {{\hat{t}}_{OF} - {\frac{1}{2f_{0}}\left( {\delta_{1} + \delta_{2}} \right)} - {\frac{1}{2f_{0}^{2}}{\begin{pmatrix}{{\left( {n - \delta_{1}} \right)\Delta \; f_{1}} -} \\{\left( {m + \delta_{2}} \right)\Delta \; f_{2}}\end{pmatrix}.}}}}\end{matrix} & {(33).}\end{matrix}$

In equation (32), since Δf₁<<f₀ and Δf₂<<f₀ the Taylor's series istruncated, ignoring the higher order terms.

In one embodiment, consider, Δδ₁<<n, and Δδ₂<<m, and n/f₀≈m/f₀. Alsoconsider one embodiment for the use of an ultrawide-band device in aWireless Personal Area Network (WPAN) where the distance is within 10 mresulting in t_(OF)≦33.33 nsec. Therefore, since where n is greater thanm by 2t_(OF) and t_(of) is very small, equation (33) can be furthersimplified as:

$\begin{matrix}{{t_{OF} \approx {{\hat{t}}_{OF} - {\frac{1}{2f_{0}}\left( {\delta_{1} + \delta_{2}} \right)} - {\frac{1}{2f_{0}^{2}}\left( {{n\; \Delta \; f_{1}} - {m\; \Delta \; f_{2}}} \right)}}},} & (34) \\{\mspace{34mu} {\approx {{\hat{t}}_{OF} - {\frac{1}{2f_{0}}\left( {\delta_{1} + \delta_{2}} \right)} - {\frac{n}{2f_{0}^{2}}{\left( {{\Delta \; f_{1}} - {\Delta \; f_{2}}} \right).}}}}} & (35)\end{matrix}$

Therefore, to get rid of the inaccuracy due to clock drift, in oneembodiment, both Δf₁ and Δf₂, in other words, the clock drift of both ofthe clocks in device 102 and device 104, is used. However, to estimateΔf₁ and Δf₂ separately is not always possible due to unavailability ofexact time elapsed during the measurements. Therefore, a method ofestimating the quantity Δf₁−Δf₂ is now described. This technique allowsremoval or at least diminishing of the inaccuracy due to clock-frequencyoffset.

FIG. 15 is a diagram illustrating three sets of ranging measurementsthat can be used to estimate the clock-frequency offset in accordancewith one embodiment of the invention. Referring now to FIG. 15, in oneembodiment, the clock drift between two clocks is determined frommultiple clock measurements. Preferably, where there is the presence ofnoise and finite clock resolution, it is favorable to consider a highernumber of ranging measurements. Three ranging measurements areillustrated in FIG. 15, although other quantities of measurements can beused.

Note that in the illustrated embodiment, all of the K≧2 sets ofmeasurements, namely, T₁(1), T₂ (1), . . . , T₁(K), T₂(K), R₁(1), R₂(1),. . . , R₁(K) are in values of clock-cycles and can be maintained incounter registers associated with devices 102, 104 or elsewhere. Also inthe described embodiment, the time of flight, t_(OF), the clock offsetbetween two devices ν, and measurement inaccuracy due to finite clockresolution φ₁ and φ₂ are in seconds. Let n′(K) be the number of cycleselapsed in device 102 between the measurements of T₁(K) and T₁(1) andm′(K) is the number of cycles elapsed in device 104 between themeasurements of R₂(K) and R₂(1) .

Assuming the detection of the reference signal is perfect in both thedevices, n(K) and m(K) can be related as:

$\begin{matrix}{{\frac{n^{\prime}(K)}{f_{0} + {\Delta \; f_{1}}} + t_{OF} + {\phi_{2}(K)}} = {\left. {\frac{m^{\prime}(K)}{f_{2} + {\Delta \; f_{2}}} + t_{OF} + {\phi_{2}(1)}}\Rightarrow{\frac{n^{\prime}(K)}{f_{0} + {\Delta \; f_{1}}} + \frac{\delta_{2}(K)}{f_{0} + {\Delta \; f_{2}}}} \right. = {\frac{m^{\prime}(K)}{f_{0} + {\Delta \; f_{2}}} + \frac{\delta_{2}(1)}{f_{0} + {\Delta \; f_{2}}}}}} & (36) \\{{\left. \Rightarrow\frac{n^{\prime}(K)}{{m^{\prime}(K)} + {\delta_{2}(1)} - {\delta_{2}(K)}} \right. = {\left. \frac{f_{0} + {\Delta \; f_{1}}}{f_{0} + {\Delta \; f_{2}}}\Rightarrow{{\Delta \; f_{1}} - {\Delta \; f_{2}}} \right. = {\left. {\left( {f_{0} + {\Delta \; f_{2}}} \right) \cdot \left( \frac{\begin{matrix}{{n^{\prime}(K)} - {m^{\prime}(K)} -} \\\left( {{\delta_{2}(1)} - {\delta_{2}(K)}} \right)\end{matrix}}{{m^{\prime}(K)} + {\delta_{2}(1)} - {\delta_{2}(K)}} \right)}\Rightarrow{{\Delta \; f} \approx {f_{0} \cdot \left( \frac{{n^{\prime}(K)} - {m^{\prime}(K)} - \left( {{\delta_{2}(1)} - {\delta (K)}} \right)}{m^{\prime}(K)} \right)}}\Rightarrow \right.\mspace{40mu} = {\left. {{f_{0} \cdot \frac{{n^{\prime}(K)} - {m^{\prime}(K)}}{m^{\prime}(K)}} - {f_{0} \cdot \frac{\left( {{\delta_{2}(1)} - {\delta_{2}(K)}} \right)}{m^{\prime}(K)}}}\Rightarrow \right.\mspace{40mu} = \left. {{\Delta \; {\hat{f}(K)}} - {f_{0} \cdot \frac{\left( {{\delta_{2}(1)} - {\delta_{2}(K)}} \right)}{m^{\prime}(K)}}}\Rightarrow{{\Delta \; {\hat{f}(K)}} \approx {{\Delta \; f} + {f_{0} \cdot \frac{\left( {{\delta_{2}(1)} - {\delta_{2}(K)}} \right)}{m^{\prime}(K)}}}} \right.}}}},} & (37)\end{matrix}$

where the estimate of the clock-frequency offset is given byΔ{circumflex over (f)}(K)=f₀(n′(K)−m′(K)/m′(K), and δ₂(1)=φ₂(1)·(f₀+Δf₂)and δ₂(K)=φ₂(N)·(f₀+Δf₂) are inaccuracies in the measurements of thearrival time at device 104 given by R₂(1) and R₂(K), respectively, dueto finite clock resolution.

δ₂(1) and δ₂(K) are given by

$\begin{matrix}{{{\delta_{2}(1)} = {\left\lceil {ɛ - \eta} \right\rceil - \left( {ɛ - \eta} \right)}},{and}} & (38) \\\begin{matrix}{{\delta_{2}(K)} = {\left\lceil {ɛ - {\eta (K)}} \right\rceil - \left( {ɛ - {\eta (K)}} \right)}} \\{= {\left\lceil {ɛ - \eta - {{mod}\left( {\Delta \; {f \cdot 2}\left( {K - 1} \right)T} \right)}_{1}} \right\rceil -}} \\{\left( {ɛ - \eta - {{mod}\left( {\Delta \; {f \cdot 2}\left( {K - 1} \right)T} \right)}_{1}} \right)} \\{= {\left\lceil {ɛ - \eta - {\Delta \; {f \cdot 2}\left( {K - 1} \right)T}} \right\rceil - \left( {ɛ - \eta - {\Delta \; {f \cdot 2}\left( {K - 1} \right)T}} \right)}}\end{matrix} & (39)\end{matrix}$

where η(K)=η+mod(Δf·2(K−1)T)₁ is the clock-offset that occurs betweentwo devices 102, 104 during the start of K sets of ranging measurements,namely, between T₁(K) and R₂(K), and T=T T_(RMpacket)+SIFS+t_(OF) withT_(RMpacket) denoting the duration of the RM (Ranging Measurement)packet, and SIFS denoting the short interframe spacing.

T_(RMpacket), the duration of the RM (Ranging Measurement) packet isgiven in Table 6, and the short interframe spacing (SIFS) is 10μ secaccording to the WiMedia standard. Note that δ₂(1)˜U(0,1) andδ₂(K)˜U(0,1), and thus assuming independence of δ₂(1) and δ₂(K) over therealization of ε, η and K, the distribution of δ₂(1)−δ₂(K) is triangularfrom −1 to 1 with a mean of zero. Therefore, usingm′(k)=2(k−1)T·(f₀+Δf₂) in (37) and the sample mean of Δ{circumflex over(f)}(k) for k=K₁, . . . , K yields the following estimate

$\begin{matrix}{{\Delta \; \hat{f}} = {\frac{1}{K - K_{1}}{\sum\limits_{k = K_{1}}^{K}{\delta {\hat{f}(k)}}}}} \\{{= {{\Delta \; f} + {\frac{1}{2{T\left( {K - K_{1}} \right)}}{\sum\limits_{k = K_{1}}^{K}\frac{{\delta_{2}(1)} - {\delta_{2}(k)}}{\left( {k - 1} \right)}}}}},.}\end{matrix}$

The fact that a system may have a finite clock resolution can have aneffect on the estimate of the clock drift. Particularly, the sample-meanof the estimates of clock frequency offset reduce the bias in theestimate, and thus a higher value of K, the total number of packettransactions, may be desirable. Additionally, waiting a longer period oftime before obtaining the estimate the clock frequency-offset can makethe estimator less susceptible to the error due to finite clockresolution.

TABLE 6 RM frame-related parameter: standard frame, each OFDM symbol is312.5 ns duration Parameter Description Value N_(pf) Number of symbolsin the 24 packet/frame synchroniza- tion sequence T_(pf) Duration of thepacket/ 24 × 312.5 × 10⁻⁹ = 7.5 μs frame synchronization sequence N_(ce)Number of symbols in the 6 channel estimation sequence T_(ce) Durationof the channel 6 × 312.5 × 10⁻⁹ = 1.875 μs estimation sequence N_(hdr)Number of symbols in the 12 PLCP Header T_(hdr) Duration of the PLCP 12× 312.5 × 10⁻⁹ = 3.75, μs Header N_(RMframe) Number of symbols in RMframe${6 \times \left\lceil \frac{8 + 38}{N_{{IBP}\; 6S}} \right\rceil} = 6$T_(RMframe) Duration for the PSDU 6 × 312.5 × 10⁻⁹ = 1.875 μ sN_(RMpacket) Total number of symbols in N_(pf) + N_(ce) + N_(hdr) +N_(RMframe) = the packet 48 T_(RMpacket) Duration of the RM packet 48 ×312.5 × 10⁻⁹ = 15 μs

where N_(IBP6S) is the number of info bits per 6 OFDM symbol.

Note that as k goes bigger the error term in the estimate gets smallerand we should consider higher value for K₁ and K for better estimate.The estimate of Δ{circumflex over (f)} can be used appropriately to getrid of the effect of clock-frequency offset from the ranging estimate.

To apply the time-offset measurements with n/N, n=0,1, . . . , N−1offset for ranging in the presence of clock drift or clock frequencyoffset, the bias due to clock frequency offset may first be removed (orcompensated) from the measurements and the applied time-offset in thefirst device 102 can be such that when it is added to the time-offset,created due to the presence of clock-frequency offset during the startof the previous measurement to the start of the present measurement, thetotal relative time-offset becomes n/N, n=1, . . . , N−1.

In the previous analysis the presence of clock-frequency offset betweentwo devices 102, 104 was considered, its effect on the estimation oftime of flight described. Now described are other related implementationand practical issues that can impact the estimation accuracy of the timeof flight in various embodiments or applications of the invention.

In ranging algorithms according to the present invention, there aremultiple techniques that can be used to implement time-offset in theadditional measurements, as would be apparent to one of ordinary skillin the art after reading this disclosure. In one embodiment, controllogic can be implemented to provide a different measurement interval fordetecting transmission and reception of the signals. This can be done,for example, by shifting the clock phase over time, determining a newsampling time based on the existing clock signal, and other liketechniques. Such control logic can be implemented using hardware,software, or a combination thereof. For example, one or more processors,ASICs, PLAs, and other logic devices or components can be included withthe device to implement the desired features and functionality. Asanother example, in one embodiment, a hardware switch or likecomponentry can be implemented to enable shifting the sampling clockpulse by a predetermined amount and thus create a relative time offsetbetween consecutive sampling instances of devices 102, 104. In yetanother embodiment of the invention, the use of a different clock edgefor sampling can provide the desired offset. For example, sampling thedata on the rising edge instead of the falling edge, or vice versa, cancreate a time offset between the sampling instants of multiplemeasurements between two devices 102, 104. In still a furtherembodiment, the normally occurring clock drift can provide a source ofoffset over a given period of time.

For example, with ρ=Δf/f₀ (in ppm) clock-frequency offset, and nominalfrequency, f₀, x number of clock cycles required to obtain an n/N, n=1,. . . , N−1 clock-period time-offset is given by

$\begin{matrix}{{{mod}\left( {\rho \cdot x} \right)}_{1} = \frac{n}{N}} & (40)\end{matrix}$

where mod(·)₁ denotes modulo 1 operation. Furthermore, if we constrainthe number of clock cycles to be elapsed as multiple of clock cycles inone set of two-way ranging measurement, then, (40) can rewritten as

$\begin{matrix}{{{mod}\left( {2{T \cdot f_{0} \cdot \rho \cdot x}} \right)}_{1} = \frac{n}{N}} & (41)\end{matrix}$

with T=T_(RMpacket)+SIFS+t_(OF) where x is required set of ranging.

Equations (40) and (41) can be solved numerically for integer value ofx. For example, for a ρ=40 ppm, f₀=528 MHz , T≈25 μsec and a ½clock-period offset (n=1, N=2), x=12500 cycles according to (40) and x≈9sets of ranging measurements according to (41). Likewise, for ⅓ and ⅔(N=3, n=1,2) offset x≈6 and 12 sets of ranging measurements,respectively. Therefore, in one embodiment, device 102 completes x setsof ranging transactions to reach n/N clock-period offset. In oneembodiment, multiple ranging measurements with the compensation of clockdrift that makes the time-offset between different measurements the samecan be used to refine the time of flight estimate by averaging.

In applications where noise is a factor, a packet 112, 114, or othersignal used for ranging, may be lost. In one embodiment, if a packet112, 114 or signal is lost within a particular set of measurements, thatloss can be detected and the measurement set removed from thecomputations so that ranging can be performed more accurately.

Likewise, in some applications the timing of the detection of the packet112, 114 or signal may be affected, creating a jitter or otheruncertainty in the time of arrival. In one embodiment the impact ofjitter or timing uncertainties due to noise or other factors can bereduced by averaging the results over multiple measurements.

In some applications, especially in the wireless arenas, the presence ofmultipath may affect the accuracy of ranging measurements. In thepresence of a line of sight (LOS) transmission path, the first packet112, 114 to be received would give the right measure of the time ofarrival. Thus, in one embodiment, where multiple receive measurementsare made, the first in time to occur is the measurement used for rangingpurposes. In another embodiment, the highest signal strength measurementis used. In other embodiments, any one or more (including all) of themultiple signals received can be used. For example, consider anapplication of ultra-wideband systems employed in WPAN. In thisapplication, due to high number of resolvable multipath and less usermobility there is typically less fading than some other applications.Thus, in this environment, it is very likely that the first path in thepresence of LOS would have higher strength than the other paths. Assuch, the time of arrival estimation based on the maximum value ofcorrelation yields the correct range estimate. However, in the absenceof a LOS, the range estimate in one embodiment simply becomes an upperbound estimation of the true distance.

The arrival of a packet at a receiver can detected by using correlationbetween the received sequence and a pilot sequence stored in thereceiver. Due to the asynchronous nature of the ranging transaction,there is typically a fractional clock-period offset between the samplinginstants of the transmitter and the receiver, as described above. Inaddition, the length of the time of flight can approach a fractional(non-integer) multiple of the clock period, making the correlationresult imperfect. Therefore, the peak of the correlation may occur atthe next or previous immediate sampling instant of the actual arrivaltime of the packet. In one embodiment, it can be assumed that the packetis detected at the next immediate sampling instant that results in themean value of the clock-uncertainty in the estimate as a half clockperiod. However, use of correlation in the practical case makes the meanvalue of the error in the estimate to be zero. Thus, considering theeffect of correlation in finding the arrival time, the refined estimateof time of flight given by equation (28) can be modified as

$\begin{matrix}{{\left( {\overset{\Cup}{t}}_{OF} \right)_{N} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - {\frac{1}{2N}{\left( {\sum\limits_{n = 0}^{N - 1}D_{n/N}} \right).}}}} & (42)\end{matrix}$

Because there is a time gap between the generation and the actualtransmission of the reference signal on the transmit side (and a similarlatency between the actual arrival and the detection of a packet on thereceive side), in one embodiment the ranging measurements are calibratedaccordingly. For example, in one embodiment the measurements in device102 can be calibrated as

T _(1c) =T ₁+(TTD)_(DEV1)

R _(1c) =R ₁−(RTD)_(DEV1)   (43)

where (TTD)_(DEV1) is the transmit-time-delay between the generation ofthe reference signal and the transmission time from the antenna ofdevice 102, (RTD)_(DEV1) is the receive-time-delay between the arrivalof the reference signal at the antenna of device 102 and the time it isdetected at by the receiver, and T_(1c) and R_(1c) are calibratedtransmission time and receive time of the packet, respectively, thoseare used as the ranging measurements. Similarly, device 104 will yield

T _(2c) =T ₂+(TTD)_(DEV2)

R _(2c) =R ₂−(RTD)_(DEV2)   (44)

Using the calibrated measurements in (42) and (44), the estimate of timeof flight is now given by

$\begin{matrix}{{{\hat{t}}_{OF} \cdot f_{0}} = {\frac{\left( {R_{1c} - T_{1c}} \right) - \left( {T_{2c} - R_{2c}} \right)}{2}.}} & (45)\end{matrix}$

In another embodiment, devices 102, 104 may have different samplingfrequencies. In this case, the distribution of the uncertainty due tofinite resolution of the clock will no longer be triangular. Supposedevices 102, 104 operate on f₁+Δf₁ and f₂+Δf₂ respectively, where f₁ andf₂ are the nominal frequencies with l=f₁/f₂. It can be shown that

$\begin{matrix}{t_{OF} \approx {{\hat{t}}_{OF} - \left( {\frac{\delta_{1}}{2f_{1}} + \frac{\delta_{2}}{2f_{2}}} \right) - {\frac{1}{2f_{2}^{2}}{\left( \frac{{n\; \Delta \; f_{1}} - {{ml}^{2}\Delta \; f_{2}}}{l^{2}} \right).}}}} & (46)\end{matrix}$

Note that with f₁=f₂=f₀ and l=1, equation (46) becomes (34). Assumingthat the effect of frequency offset is compensated, equation (46) can bewritten as

$\begin{matrix}{{{\hat{t}}_{OF} \cdot f_{1}} \approx {{t_{OF} \cdot f_{1}} - {\frac{1}{2}{\left( {\delta_{1} + \delta_{2}} \right).}}}} & (47)\end{matrix}$

Thus, comparing equation (47) with equation (7) it is evident that theuncertainty is now changed from (δ₁+δ₂)/2 to (δ₁+lδ₂)/2. Accordingly thedistribution of uncertainty is changed and now its domain is from zeroto (l+1)/2. Therefore, for l>1, the estimate will have higheruncertainty than before. Considering the new distribution of theuncertainty, appropriate bias can be determined based on the differencesof estimates (obtained using clock-offset) from the prior estimate(without any additional clock-offset).

The inventors conducted simulations with one or more embodiments of theinvention to illustrate the effectiveness of the results and theincreased accuracy in ranging via time-offset measurements. Results ofthese simulations are now described. Without loss of generality,consider that (t_(OF))_(int)·f₀1. ε=t_(OF)·f₀−(t_(OF))_(int)·f₀ andtime-offset η are generated from uniform random distribution from 0to 1. f₀, the sampling clock frequency of the clock, is considered to be528 MHz. This is the minimum clock frequency of ranging implementationof UWB systems proposed by the WiMedia-MBOA.

For a given realization of ε and η, δ₁ and δ₂ can be calculated usingequations (5) and (6), respectively. The coarse estimate oftime-of-flight (in cycles) {circumflex over (t)}_(OF)·f₀ is calculatedusing δ₁ and δ₂ in equation (7). D_(n/N) is calculated according toequation (21) and a fine unbiased estimate of time of flight (in cycles)({hacek over (t)}_(OF))_(N)·f₀ is calculated according to equation (28)using calculated {circumflex over (t)}_(OF) and D_(n/N). The MSE (MeanSquared Error) of the unbiased estimator MSE(N)=E[((({hacek over(t)}_(OF))_(N)−t_(OF))·f₀)²] was obtained from the average of over10,000 simulation runs and is shown in FIG. 16, where N=1 corresponds tothe conventional case with no additional time-offset measurement. FIG.16 illustrates a performance comparison of time of flight (in clockcycles) estimators using one embodiment of the present invention. Fromthis simulation as illustrated in FIG. 16, it is evident that as Nincreases the performance of the ranging algorithm that uses additionalN−1 time-offset measurements improves. Table 7 shows the confidencelevel γ of the time of flight (in cycles) estimator obtained fromanalysis and simulation.

Ranging estimator {hacek over (d)} (in cm) is obtained as {hacek over(d)}_(N)=({hacek over (t)}_(OF))_(N)·c and the MSE of the rangingestimator MSE(N)=E[({hacek over (d)}_(N)−d)²] obtained from the averageover 10000 simulation runs. The results of these are plotted in FIG. 17as a function of N. FIG. 17 is a diagram illustrating simulation resultsfor a performance comparison of ranging from N=1 to 10, where N=1 is aconventional technique, and using N·f₀ sampling clock frequency. Asillustrated in FIG. 17, the time-offset ranging measurements yieldsuperior performance to conventional measurement techniques. Further,with higher N and n/N, (n=1, . . . , N−1) the MSE is reduced, and thusperformance improves. FIG. 17 also illustrates that performance of theranging estimator is the same with N*f₀ clock-frequency and with n/N,n=1, . . . , N−1 time-offset measurements. Thus, use of n/N, n=1, . . ., N−1 time-offset measurements is equivalent to the use of N·f₀ samplingclock-frequency. Therefore, when it is not viable to use higher samplingclock frequency in the device, we can achieve superior rangingperformance using n/N, n=1, . . . , N−1 clock-offset measurement whichis equivalent to using N·f₀ sampling clock-frequency.

TABLE 7 Analytical vs. Simulation Results on Confidence IntervalAnalytical vs. Simulated Confidence Confidence Interval Level γ (incycle) N = 1 N = 2 N = 3 N = 4 N = 5 N = 6 N = 7 N = 8 N = 9 N = 10 0.99analytical 0.45 0.225 0.15 0.112 0.09 0.075 0.064 0.056 0.05 0.045simulation 0.451 0.226 0.15 0.113 0.09 0.074 0.064 0.056 0.05 0.045 0.8analytical 0.28 0.14 0.093 0.07 0.056 0.046 0.04 0.035 0.0311 0.028simulation 0.275 0.138 0.093 0.07 0.055 0.045 0.039 0.034 0.030 0.027

To show the effectiveness of the present invention, consider a casewhere f₀=528 MHz, with clock accuracy of device 102, ρ₁=20 ppm anddevice 104, ρ₂=15 ppm, and thus the actual frequency offset isΔf=Δf₁−Δf₂=f₀(ρ₁−ρ₂)=2640 Hz. Again, without loss of generality,consider the case of (t_(OF))_(int)=1. ε and η are generated fromuniform distribution over 0 to 1. m′(k) is calculated fromm′(k)=2(k−1)T·(f₀+Δf₂), where T=25 μsec+t_(OF) (Table 6) and n(k) iscalculated from equation (36) for a given realization of δ₂(1) (fromequation (38), and δ₂(K) (from equation (39)). The estimate of the clockfrequency-offset was obtained as Δ{circumflex over(f)}(K)=f₀·(n′(K)−m′(K))/m′(K) and averaged over 10,000 simulations asshown in FIG. 18.

FIG. 18 is a plot illustrating the improvement of the accuracy ofclock-frequency offset over the number of ranging measurement sets K inaccordance with one embodiment of the invention. From FIG. 18, it can beseen that Δ{circumflex over (f)} converges to the actual value of 2640as the number of ranging measurement gets higher. Note that thedetrimental effect of the finite clock resolution is very prominent atthe lower values of K. This phenomenon can be explained from equation(37). δ₂(1)−δ₂(K) is a pseudo-periodic function within −1 to 1 thatcauses oscillation in the estimator. However, m(K) increases linearlywith K and thus, at lower values of K, the error term (δ₂(1)−δ₂(K))/m(K)is higher and decays as K grows.

While various embodiments of the present invention have been describedabove, it should be understood that they have been presented by way ofexample only, and not of limitation. Thus the breadth and scope of thepresent invention should not be limited by any of the above-describedexemplary embodiments. Additionally, the invention is described above interms of various exemplary embodiments and implementations. It should beunderstood that the various features and functionality described in oneor more of the individual embodiments are not limited in theirapplicability to the particular embodiment with which they aredescribed, but instead can be applied, alone or in some combination, toone or more of the other embodiments of the invention, whether or notsuch embodiments are described and whether or not such features arepresented as being a part of a described embodiment.

Terms and phrases used in this document, and variations thereof; unlessotherwise expressly stated, should be construed as open ended as opposedto limiting. As examples of the foregoing: the term “including” shouldbe read as mean “including, without limitation” or the like; the term“example” is used to provide exemplary instances of the item indiscussion, not an exhaustive or limiting list thereof; and adjectivessuch as “conventional,” “traditional,” “normal,” “standard,” and termsof similar meaning should not be construed as limiting the itemdescribed to a given time period or to an item available as of a giventime, but instead should be read to encompass conventional, traditional,normal, or standard technologies that may be available now or at anytime in the future. Likewise, a group of items linked with theconjunction “and” should not be read as requiring that each and everyone of those items be present in the grouping, but rather should be readas “and/or” unless expressly stated otherwise. Similarly, a group ofitems linked with the conjunction “or” should not be read as requiringmutual exclusivity among that group, but rather should also be read as“and/or” unless expressly stated otherwise.

1. A method of determining a distance between first and second wirelesscommunication devices, comprising the steps of: conducting a firstestimate of a time of flight of a signal between the first and secondwireless communication devices; conducting subsequent estimates of timeof flight of signals between the first and second wireless communicationdevices, wherein the subsequent estimates are each performed with aclock phase in one of the devices that is offset relative to its phasein a prior estimate; computing differences between the first time offlight estimate and the subsequent estimates; computing a refinedestimate of the time of flight of a signal between the first and secondwireless communication devices based on the differences between thesubsequent and prior time-of-flight estimates; and computing a distancebased on the refined time-of-flight estimate.
 2. The method of claim 1,further comprising a step of determining a range of inaccuraciesassociated with the time-of-flight estimates, based on the differencesbetween the time-of-flight estimates, and using this range in computingthe refined estimate.
 3. The method of claim 1, wherein the step ofcomputing the refined estimate comprises the steps of: determining thedifference D_(n/N) between the zero-th (n=0) and the nth of the Ntime-of-flight estimates as D_(n/N)=2({circumflex over(t)}_(OF)−({circumflex over (t)}_(OF))_(n/N))·f₀, n=0,1, . . . , N−1,where {circumflex over (t)}_(OF) is the zero-th (n=0) time of flightestimate, ({circumflex over (t)}_(OF))_(n/N) is the nth estimate, f₀ isthe clock frequency; and computing a refined estimate of the time offlight of the signal based on the determined differences, wherein therefined estimate is determined as${\left( {\overset{\Cup}{t}}_{OF} \right)_{N} \cdot f_{0}} = {\beta \cdot \left\lbrack {{{\hat{t}}_{OF} \cdot f_{0}} - {\alpha \cdot \left( {{\frac{1}{2N}\left( {\sum\limits_{n = 0}^{N - 1}D_{n/N}} \right)} + \frac{1}{2}} \right)} + c} \right\rbrack}$where α, β and c are constants.
 4. The method of claim 1, wherein aclock phase offset for a subsequent estimate is 1/N clock cycles.
 5. Themethod of claim 1, wherein a clock phase offset is introduced by atleast one of hardware switching, control logic, clock edge selection,clock drift and other clock anomalies that produce a clock offset. 6.The method of claim 1, wherein the differences D_(n/N) measured areexpressed in terms of a predetermined set of discrete values, and therefined estimate is determined based on the sequence of determineddifferences.
 7. The method of claim 1, wherein each calculateddifference is determined as a discrete value, and further comprising thestep of determining a sequence of discrete values given by a sequence ofdifference estimates D_(n/N) for the range of n=1 to N−1.
 8. The methodof claim 7, wherein a discrete value for a difference estimate isdetermined by calculating the difference as a function of the clockoffset between the first and second devices, and a fractional portion ofthe time-of-flight.
 9. The method of claim 1, wherein the discrete valuefor a difference estimate is chosen from the set of 1, 0 and −1, and therefined estimate is determined based on the sequence of D_(n/N) as givenin the following table: Sequence {hacek over (t)}_(OF)-C, Estimate ofTime- Number D_((N−1)/N) D_((N−2)/N) D_((N−3)/N) . . . D_(3/N) D_(2/N)D_(1/N) of-Flight minus a constant 1 1 1 1 . . . 1 1 1${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 1}{2N}}$2 1 1 1 . . . 1 1 0${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 2}{2N}}$3 0 1 1 . . . 1 1 1${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 2}{2N}}$4 1 1 1 . . . 1 0 0${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 3}{2N}}$5 0 1 1 . . . 1 1 0${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 3}{2N}}$6 0 0 1 . . . 1 1 1${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{{2N} - 3}{2N}}$⋮ ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ ⋮ $\frac{\left( {N - 1} \right)N}{2} + 1$ 0 0 0 . . . 0 00${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{1}{2}}$⋮ ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ ⋮ (N − 1)N − 4 0 0 −1 . . . −1 −1 −1${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{3}{2N}}$(N − 1)N − 3 0 −1 −1 . . . −1 −1 0${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{3}{2N}}$(N − 1)N − 2 −1 −1 −1 . . . −1 0 0${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{3}{2N}}$(N − 1)N − 2 0 −1 −1 . . . −1 −1 −1${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{2}{2N}}$(N − 1)N −1 −1 −1 . . . −1 −1 0${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{2}{2N}}$(N − 1)N + 1 −1 −1 −1 −1 −1 −1 −1${{\overset{\Cup}{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OF} \cdot f_{0}} - \frac{1}{2N}}$


10. The method of claim 1, further comprising the step of determining anamount of clock drift between the first and second devices over aplurality of ranging estimates.
 11. The method of claim 10, wherein theamount of clock drift between the first and second devices is computedas $\begin{matrix}{{\Delta \hat{f}} = {\frac{1}{K - K_{1}}{\sum\limits_{k = K_{1}}^{K}{\Delta {\hat{f}(k)}}}}} \\{= {{\Delta \; f} + {\frac{1}{2{T\left( {K - K_{1}} \right)}}{\sum\limits_{k = K_{1}}^{K}{\frac{{\delta_{2}(1)} - {\delta_{2}(k)}}{\left( {k - 1} \right)}.}}}}}\end{matrix}$
 12. The method of claim 1, further comprising the step ofaveraging estimate results over multiple estimates to reduce the effectsof timing uncertainties due to the presence of finite clock resolution.13. The method of claim 1, wherein if multiple signals are received foran estimate step, the first signal received for that estimate step isused to measure a time of arrival for that step.
 14. The method of claim1, wherein if multiple signals are received for an estimate step, asubset of one or more of the multiple signals received for that estimatestep is used to measure a time of arrival for that step.
 15. The methodof claim 1, wherein if multiple signals are received for an estimatestep, all of the signals received for that estimate step are used tomeasure a time of arrival for that step.
 16. The method of claim 1,wherein if multiple signals are received for an estimate step, thesignal having the greatest signal strength for that estimate step isused to measure a time of arrival for that step.
 17. The method of claim1, wherein a transmit time used in conducting a time-of-flight estimateis calibrated to compensate for a time delay between the generation ofthe signal in a transmitting device and the transmission time from theantenna of that device.
 18. The method of claim 1, wherein a receivetime used in conducting a time-of-flight estimate is calibrated tocompensate for a time delay between the reception time of a signal atthe antenna of a device and the time the signal is detected by thereceiver.
 19. The method of claim 1, further comprising the step ofcompensating for sampling frequency offset between the first and seconddevices by determining a bias based on differences between estimatesobtained using clock offset and the first estimate.
 20. The method ofclaim 1, further comprising the step of compensating for samplingfrequency offset between the first and second devices by determining abias based on the estimate of the clock frequency offset as${{\hat{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OFc} \cdot f_{0}} - {{\frac{T_{process}}{2f_{0}} \cdot \Delta}\; \hat{f}}}$where {circumflex over (t)}_(OFc) is an estimate of time-of-flightwithout clock frequency offset compensation, Δ{circumflex over (f)} isan estimate of clock frequency offset and T_(process) is a processingtime between the packet reception and transmission.
 21. An electronicdevice configured to determine a distance between a first wirelessdevice and a second wireless device, the electronic device comprising: amemory configured to store instructions; and a processor configured toread instructions from the memory, the instructions configured to causethe device to: conduct a first estimate of a time-of-flight of a signalbetween the first and second wireless communication devices; conductsubsequent estimates of time of flight of signals between the first andsecond wireless communication devices, wherein the subsequent estimatesare each performed with a clock phase in one of the devices that isoffset relative to its phase in a prior estimate; compute differencesbetween the first time of flight estimate and the subsequent estimates;and compute a refined estimate of the time of flight of a signal betweenthe first and second wireless communication devices based on thedifferences between the subsequent and prior time-of-flight estimates;and compute a distance based on the refined time of flight estimate. 22.The electronic device of claim 21, wherein the instructions are furtherconfigured to cause the device to determine a range of inaccuraciesassociated with the time-of-flight estimates, based on the differencesbetween the time-of-flight estimates, and using this range in computingthe refined estimate.
 23. The electronic device of claim 21, wherein theinstructions are further configured to cause the device to compute therefined estimate comprises the steps of: determining the differenceD_(n/N) between the zero-th (n=0) and the nth of the N time-of-flightestimates as D_(n/N)=2({circumflex over (t)}_(OF)−({circumflex over(t)}_(OF))_(n/N))·f₀, n=0,1, . . . , N−1, where {circumflex over(t)}_(OF) is the zero-th (n=0) time of flight estimate, ({circumflexover (t)}_(OF))_(n/N) is the nth estimate, f₀ is the clock frequency;and computing a refined estimate of the time of flight of the signalbased on the determined differences, wherein the refined estimate isdetermined as${\left( {\overset{\Cup}{t}}_{OF} \right)_{N} \cdot f_{0}} = {\beta \cdot \left\lbrack {{{\hat{t}}_{OF} \cdot f_{0}} - {\alpha \cdot \left( {{\frac{1}{2N}\left( {\sum\limits_{n = 0}^{N - 1}D_{n/N}} \right)} + \frac{1}{2}} \right)} + c} \right\rbrack}$where α, β and c are constants.
 24. The electronic device of claim 21,wherein the instructions are further configured to cause the device touse a clock phase offset for a subsequent estimate is 1/N clock cycles.25. The electronic device of claim 21, wherein the instructions arefurther configured to cause the device to introduce a clock phase offsetby at least one of hardware switching, control logic, clock edgeselection, clock drift and other clock anomalies that produce a clockoffset.
 26. The electronic device of claim 21, wherein the instructionsare further configured to cause the device to calculate difference as adiscrete value, and further cause the device to determine a sequence ofdiscrete values given by a sequence of difference estimates D_(n/N) forthe range of n=1 to N−1.
 27. The electronic device of claim 21, whereina discrete value for a difference estimate is determined by calculatingthe difference as a function of the clock offset between the first andsecond devices, and a fractional portion of the time-of-flight.
 28. Theelectronic device of claim 21, further comprising the step ofdetermining an amount of clock drift between the first and seconddevices over a plurality of ranging estimates.
 29. The electronic deviceof claim 21, further comprising the step of averaging estimate resultsover multiple estimates to reduce the effects of timing uncertaintiesdue to the presence of finite clock resolution.
 30. The electronicdevice of claim 21, wherein if multiple signals are received for anestimate step, the first signal received for that estimate step is usedto measure a time of arrival for that step.
 31. The electronic device ofclaim 21, wherein if multiple signals are received for an estimate step,a subset of one or more of the multiple signals received for thatestimate step is used to measure a time of arrival for that step. 32.The electronic device of claim 21, wherein if multiple signals arereceived for an estimate step, all of the signals received for thatestimate step are used to measure a time of arrival for that step. 33.The electronic device of claim 21, wherein if multiple signals arereceived for an estimate step, the signal having the greatest signalstrength for that estimate step is used to measure a time of arrival forthat step.
 34. The electronic device of claim 21, wherein a transmittime used in conducting a time-of-flight estimate is calibrated tocompensate for a time delay between the generation of the signal in atransmitting device and the transmission time from the antenna of thatdevice.
 35. The electronic device of claim 21, wherein a receive timeused in conducting a time-of-flight estimate is calibrated to compensatefor a time delay between the reception time of a signal at the antennaof a device and the time the signal is detected by the receiver.
 36. Theelectronic device of claim 21, further comprising the step ofcompensating for sampling frequency offset between the first and seconddevices by determining a bias based on differences between estimatesobtained using clock offset and the first estimate.
 37. The electronicdevice of claim 21, further comprising the step of compensating forsampling frequency offset between the first and second devices bydetermining a bias based on the estimate of the clock frequency offsetas${{\hat{t}}_{OF} \cdot f_{0}} = {{{\hat{t}}_{OFc} \cdot f_{0}} - {{\frac{T_{process}}{2f_{0}} \cdot \Delta}\; \hat{f}}}$where {circumflex over (t)}_(OFc) is an estimate of time-of-flightwithout clock frequency offset compensation, Δ{circumflex over (f)} isan estimate of clock frequency offset and T_(process) is a processingtime between the packet reception and transmission.